The R Project SVN R

Rev

Rev 72413 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72413 Rev 72424
Line 126... Line 126...
126
## Both glibc 2.12 and macOS 10.6 used continuity from above in the first set
126
## Both glibc 2.12 and macOS 10.6 used continuity from above in the first set
127
## but they seem to assume signed zeros.
127
## but they seem to assume signed zeros.
128
## Windows gave incorrect (NaN) values on the cuts.
128
## Windows gave incorrect (NaN) values on the cuts.
129
 
129
 
130
stopifnot(identical(tanh(356+0i), 1+0i))
130
stopifnot(identical(tanh(356+0i), 1+0i))
131
## Used to be 1+NanI on Windows
131
## Used to be NaN+0i on Windows
132
 
132
 
133
## Not a regression test, but rather one of the good cases:
133
## Not a regression test, but rather one of the good cases:
134
(cNaN <- as.complex("NaN"))
134
(cNaN <- as.complex("NaN"))
135
stopifnot(identical(cNaN, complex(re = NaN)), is.nan(Re(cNaN)), Im(cNaN) == 0)
135
stopifnot(identical(cNaN, complex(re = NaN)), is.nan(Re(cNaN)), Im(cNaN) == 0)
136
dput(cNaN) ## (real = NaN, imaginary = 0)
136
dput(cNaN) ## (real = NaN, imaginary = 0)