While using FPUlib last night, i found FpuFLtoA would prefix the resulting string with with a space (20h)

example:

ST0 Valid 403.84615384615384660

the resulting string would be as follows:

20h, "403.84", 0

is this is standard behavior for this function ?
Posted on 2007-07-24 20:06:07 by paradox
is this is standard behavior for this function ?


YES. This was intended for proper alignment of negative and positive values, primarily for the front end padding feature. For positive values, the space is used instead of the "+" sign.

ST0 Valid 403.84615384615384660
the resulting string would be as follows:
20h, "403.84", 0


The last digit of the returned value would always be rounded according to the dropped digits. With your example, the expected returned string should be "403.85".

Raymond
Posted on 2007-07-25 22:52:44 by Raymond