MCPcopy Create free account
hub / github.com/ValveSoftware/ToGL / FloatToString

Function FloatToString

togl/linuxwin/dx9asmtogl2.cpp:2136–2181  ·  view source on GitHub ↗

FloatToString is equivalent to sprintf( "%.12f" ), but doesn't have any dependencies on the current locale setting. Unfortunately, high accuracy radix conversion is actually pretty tricky to do right. Most importantly, this function has the same max roundtrip (IEEE->ASCII->IEEE) error as the MS CRT functions and can reliably handle extremely large inputs.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestFloatConversionFunction · 0.85
Handle_DEFMethod · 0.85

Calls 3

IsFloatNaNFunction · 0.85
PrintDoubleIntFunction · 0.85
StripExtraTrailingZerosFunction · 0.85

Tested by 1

TestFloatConversionFunction · 0.68