Files
mercury/tests/general/float_test.exp2
Julien Fischer ada4e79bdc Document how "next integer" operations handle infinite values.
Fix a test case failure in spf grades.

library/math.m:
     Document how the "next integer" operations handle arguments of infinite
     magnitude.

tests/general/float_test.m:
    s/ceil/ceiling/ in a spot.

    Test next integer operations with +/-infinity (and zero).

    In the erlang grades, avoid running parts of these tests that
    rely on library functionality that is NYI.

    Document what the expected outputs correspond to.

tests/general/float_test.exp:
    Update this expected output.

tests/general/float_test.exp2:
    Replace the contents of this file: previously it contained output for
    some ancient version of MSVC; it now contains the spf version of the
    output.

tests/general/float_test.exp3:
    A new expected output for the erlang grades.
2018-09-05 02:19:01 +00:00

77 lines
1.0 KiB
Plaintext

1234.5678: 1.23e+03
X: 3
Y: 4
X + Y: 7
X * Y: 12
X - Y: -1
X / Y: 0.75
X ^ Y: 81
X: 41
Y: -3
X + Y: 38
X * Y: -123
X - Y: 44
X / Y: -13.7
X ^ Y: 1.45e-05
Float max: 3.4e+38
Float min: 1.18e-38
Float epsilon: 1.19e-07
Pi: 3.14
e: 2.72
X: 0
ceiling(X): 0
floor(X): 0
round(X): 0
truncate(X): 0
X: 2.7
ceiling(X): 3
floor(X): 2
round(X): 3
truncate(X): 2
X: -3.6
ceiling(X): -3
floor(X): -4
round(X): -4
truncate(X): -3
X: infinity
ceiling(X): infinity
floor(X): infinity
round(X): infinity
truncate(X): infinity
X: -infinity
ceiling(X): -infinity
floor(X): -infinity
round(X): -infinity
truncate(X): -infinity
X: 2.2
sqrt(X): 1.48
ln(X): 0.788
log2(X): 1.14
log10(X): 0.342
log(2.1, X): 1.06
exp(X): 9.03
X: 0.5
sin(X): 0.479
cos(X): 0.878
tan(X): 0.546
sinh(X): 0.521
cosh(X): 1.13
tanh(X): 0.462
atan2(sin(X), cos(X)): 0.5
X: 0.6
asin(X): 0.644
acos(X): 0.927
atan(X): 0.54