Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 19 lines (14 sloc) 0.531 kB
4b9f5ae add tests of gradual underflow
ripley authored
1 ## Tests for various features of IEC60559 doubles.
2 ## Most of these are optional, so this is a sloppy test.
3
4 # Goes to denormal (aka subnormal) numbers at -708.4
5 exp(c(-745:-740, -730, -720, -710:-705))
6
7 # goes to subnormal numbers at -308, to zero at ca 5e-324.
8 10^-(324:307)
9 2^-(1022:1075)
10
11 # And because most libm pow() functions special-case integer powers.
12 10^-(324:307-0.01)/10^0.01
a56cb3d add test for sqrt(-0)
ripley authored
13
14 # IEC60559 mandates this, but C99/C11 do not.
15 # Mingw-w64 did not do so in v 2.0.1
16 x <- 0*(-1) # negative zero
17 sqrt(x)
18 identical(x, sqrt(x))
Something went wrong with that request. Please try again.