addaptic

Reference Decimal standard

lz_fraction

The fractional part of the number, its sign kept.

long lz_fraction( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );

The part after the point, keeping the number's sign, so the fractional part of −3.7 is −0.7. With lz_integer it makes up the number.

Examples

CallAnswer
lz_fraction( 3.7 )0.7
lz_fraction( −3.7 )−0.7
lz_fraction( 0x1F.8 )0.8 base 16

Each answer is what Addaptic printed for the call, at 36 places unless a setting is shown.

Returns

kNoError (0) when the answer is written. Otherwise an error code, with the answer flagged infinite or not-a-number; see Errors and flags.

See also

  • lz_integer The whole part of the number, truncated toward nought.