search for: 1e45

Displaying 5 results from an estimated 5 matches for "1e45".

Did you mean: 1045
2016 Dec 01
2
Different results for cos,sin,tan and cospi,sinpi,tanpi
...then coincide, by sheer implementation. *BUT* it is not at all clear which of the two results is better; e.g., if you replace '1.23' by '1' in the above examples, the result of the unchnaged *pi() functions is 100% accurate, whereas R> sapply(c(cos,sin,tan), function(Fn) Fn(1e45*pi)) [1] -0.8847035 -0.4661541 0.5269043 is "garbage". After all, 1e45 is an even integer and so, the (2pi)-periodic functions should give the same as for 0 which *is* (1, 0, 0). For such very large arguments, the results of all of sin() , cos() and tan() are in some sense "...
2007 Oct 23
1
Custom colourkey spacing in levelplot, contourplot
Dear R gurus, I have got stuck on how to customise the colorkey generated by levelplot and contourplot, in the lattice package. This best illustrated by an example: library(lattice) levelplot(volcano^20/1e45,at=c(0,0.001,0.01,0.1,1,10)) The reason for raising the volcano dataset to the 20th power is to create a dataset with a large vertical exaggeration - this is similar in nature to the data set that I am dealing with. Now, if you look at the colorkey to the right of the plot, you'll see that its...
2016 Dec 01
0
Different results for cos,sin,tan and cospi,sinpi,tanpi
...ntation. > > *BUT* it is not at all clear which of the two results is better; > e.g., if you replace '1.23' by '1' in the above examples, the > result of the unchnaged *pi() functions is 100% accurate, > whereas > > R> sapply(c(cos,sin,tan), function(Fn) Fn(1e45*pi)) > [1] -0.8847035 -0.4661541 0.5269043 > > is "garbage". After all, 1e45 is an even integer and so, the > (2pi)-periodic functions should give the same as for 0 which > *is* (1, 0, 0). > > For such very large arguments, the results of all of sin() , > cos...
2016 Dec 01
1
Different results for cos,sin,tan and cospi,sinpi,tanpi
...BUT* it is not at all clear which of the two results is better; >> e.g., if you replace '1.23' by '1' in the above examples, the >> result of the unchnaged *pi() functions is 100% accurate, >> whereas >> >> R> sapply(c(cos,sin,tan), function(Fn) Fn(1e45*pi)) >> [1] -0.8847035 -0.4661541 0.5269043 >> >> is "garbage". After all, 1e45 is an even integer and so, the >> (2pi)-periodic functions should give the same as for 0 which >> *is* (1, 0, 0). >> >> For such very large arguments, the result...
2016 Dec 01
2
Different results for cos,sin,tan and cospi,sinpi,tanpi
Hi, i try sin, cos, and tan. > sapply(c(cos,sin,tan),function(x,y)x(y),1.23e45*pi) [1] 0.5444181 0.8388140 1.5407532 However, *pi results the following > sapply(c(cospi,sinpi,tanpi),function(x,y)x(y),1.23e45) [1] 1 0 0 Please try whether the following becomes all right. diff -ruN R-3.3.2.orig/src/nmath/cospi.c R-3.3.2/src/nmath/cospi.c --- R-3.3.2.orig/src/nmath/cospi.c 2016-09-15