Brian Dunning's FileMaker Custom Functions

BinToFloat32IEEE ( binary )

Convert a float32 (IEEE-754) formatted binary string to a decimal number.

  Average rating: 4.3 (7 votes) Log in to vote

Arjen van Dijk   Arjen van Dijk - Show more from this author
KROHNE Altometer

Share on Facebook Share on Twitter

  Sample input:
BinToFloat32IEEE ( "11000011000110010011100111010010" )
  Sample output:
-153.225860595703125

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

CUSTOM FUNCTION: BinToFloat32IEEE ( binary )
© 2018 Arjen van Dijk, avdijk128@kpnmail.com

Convert a float32 (IEEE-754) formatted binary string to a decimal number.

EXAMPLES:

BinToFloat32IEEE ( "01000001110010000000000000000000" ) // --> 25
BinToFloat32IEEE ( "00111111100000000000000000000000" ) // --> 1
BinToFloat32IEEE ( "10111110100000000000000000000000" ) // --> -.25
BinToFloat32IEEE ( "11000001000111111111111111111100" ) // --> -9.999996185302734375
BinToFloat32IEEE ( "11000011000110010011100111010010" ) // --> -153.225860595703125

IMPLEMENTATION: Requires Bin2Dec

LAST MODIFIED: 27-Jun-2018 by Arjen van Dijk

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: