{ # dput() used to put only 6 significant digits instead of 8. # sbug 1/24/91 david temp <- tempfile() oldfp <- .C("set_full_precision", as.logical(T))[[1]] dput(file=temp, as.single(3.402823466385289e+38)) .C("set_full_precision", as.logical(oldfp)) x <- as.single(dget(temp)) unlink(temp) x == as.single(3.402823466385289e+38) } { # dump() with a-bi used to write "a--bi"; # fixed by david 8/15/91; Sbug?? z <<- 1-3i dump("z", temp <- tempfile()) rm(z) source(temp) ; unlink(temp) z == 1-3i # would be 1+3i if buggy. } { # as.single(1) + as.single(.Machine$single.eps) used to dump() as 1. # bug 179, sbug 7/28/91 david onepseps <<- as.single(1) + as.single(.Machine$single.eps) dump("onepseps", temp <- tempfile()) rm(onepseps) source(temp) ; unlink(temp) # now its double onepseps != 1 } { # 1 + .Machine$double.eps used to dump() as 1. # bug 178, sbug 7/28/91 david onepdeps <<- 1 + .Machine$double.eps dump("onepdeps", temp <- tempfile()) rm(onepdeps) source(temp) ; unlink(temp) onepdeps != 1 } { # -Inf used to data.dump as I (Inf), not J. # bug 177, sbug 7/28/91 david minf <<- -1/0 data.dump("minf", temp <- tempfile()) rm(minf) data.restore(temp) ; unlink(temp) minf == -1/0 }