c#: Convert from and to custom floating point format

I have a custom floating point format that I need to create a function in c# (up to .net 4.0 can be used) that converts a "normal" eg. .net standard float to the listed format below and a funktion to go from the custom format and back.

3.5.2 Floating-Point Format

The floating point format is based on 32 Bits with the following format:

where m - 24-bit mantissa

s - sign of the number

e - 7-bit exponent in excess 64 notation

The mantissa is considered to be a binary fixed point fraction and except for zero it is always normalised (has a one bit in its highest position). Thus, it represents a value of less than one but greater than or equal to one-half. The sign bit is a zero for a positive value, and a one for a negative value. The exponent is the power of two needed to correctly position the mantissa to reflect the number's true arithmetic value. It is held in excess 64 notation which means that the two's complement values are adjusted upward by 64, thus changing 40H (-64) - 3FH (+63) to 00H - 7FH. This facilitates comparisons among floating-point values. The value of zero is defined as all 32 bits being zeroes. The sign, exponent, and mantissa are entirely cleared. Thus, zeroes are always treated as positive.

The range allowed by this format is as follows:


9.22337177 * 1018 > Pos. VALUE > 5.42101070 * 10-20

-9.22337177 * 1018 > Neg. VALUE > -2.71050535 * 10-20


.FFFFFF * 263 > Pos VALUE > .FFFFFF * 2-63

[login to view URL] * 263 > Neg VALLUE > [login to view URL] * 2-63

Compétences : .NET, Programmation C#

en voir plus : c# string format decimal, vb.net format number, c# string format number, c# tostring format, c# tostring format decimal, c# string format currency, convert float to string in c programming, c# format number with commas, convert floating point fixed point matlab, custom floating point trackbar, convert decimal number 19557 floating point, convert string number floating point mips, writing mips functions convert integer floating point, convert floating point integer mips, mips read floating point convert, mips convert integer floating point, mips procedure convert integer floating point, mips assembly function implement floating point addition, assembly code adding floating point numbers, mips add floating point numbers

Concernant l'employeur :
( 0 commentaires ) Sweden

Nº du projet : #17351043

Décerné à:


Hello, bitwise operations is easy thing for me. Relevant Skills and Experience I have over 8 years of experience with C# and .NET Framework Proposed Milestones $20 USD - Milestone Payment

%selectedBids___i_sum_sub_4% %project_currencyDetails_sign_sub_5% USD en 1 jour
(683 Commentaires)

8 freelance font une offre moyenne de $40 pour ce travail


Convert custom 4-bytes float to native .NET floats Relevant Skills and Experience I have more than 10 years of experience in professional .NET software development. I has strong low-level (C and asm) background for th Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(36 Commentaires)

Hello. I have done a lot of C# project in the past, and I have accumulated a lot of knowledge and experience. Hire me. I will do my best to save your time and to ensure the best quality of work to satisfy you.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(31 Commentaires)
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(13 Commentaires)
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1 Évaluation)

simple logical programming Relevant Skills and Experience c# experience Proposed Milestones $25 USD - will be delivered as described

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(3 Commentaires)
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(5 Commentaires)
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(2 Commentaires)