FloatLT
Description
Test whether lhs is strictly less than rhs.
Parameters
| Name | Direction | Description |
|---|---|---|
lhs |
in | Left-hand float |
rhs |
in | Right-hand operand selected through generic dispatch |
Usage example (from documentation)
bool smaller = FloatLT(&value, other);Success
Returns true when lhs < rhs.
Failure
Returns false otherwise. Neither operand is modified.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Compare.c:71:
Float c = FloatFromStr(FLOAT_TEST_VERY_LARGE_ONES, &alloc.base);
bool result = FloatLT(&a, &b);
result = result && FloatGT(&b, &a);
result = result && (FloatCompare(&a, &c) == 0);- In
Compare.c:93:
bool result = FloatGT(&large, &small);
result = result && FloatLT(&negative_large, &small);
result = result && FloatNE(&large, &small);- In
Compare.c:112:
Float expected = FloatFromStr("5e-1", &alloc.base);
bool result = FloatLT(&a, &b);
result = result && FloatLE(&a, &b);
result = result && FloatGT(&b, &a);- In
Math.c:711:
Float tiny = FloatFrom(0x1p-149f, &alloc.base);
bool result = FloatLT(&tiny, 1.0f) && FloatGT(&tiny, 0.0f);
FloatDeinit(&tiny);- In
Math.c:767:
Float tiny = FloatFrom(0x1p-1074, &alloc.base);
bool result = FloatLT(&tiny, 1.0) && FloatGT(&tiny, 0.0);
FloatDeinit(&tiny);
Last updated on