addaptic

Reference Decimal standard

lz_integer

The whole part of the number, truncated toward nought.

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

Truncated toward nought, so the whole part of −3.7 is −3. Add lz_fraction and the number is whole again.

Examples

CallAnswer
lz_integer( 3.7 )3
lz_integer( −3.7 )−3

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