Behaviour is confirmed on 4.1.0 on Ubuntu 20.04 and Windows 10.
What's happening is
(sin(.Last.value) + sin(2 * .Last.value))
is evaluating the first sin(.Last.value) which resolves to 0.7680514
then using that in the second expression, sin(2*.Last.value) := sin(2
* 0.7680514) which resolves to
Hello:
Here is a bit of R-code:
> mvr
[1] 2.2658
> (sin(.Last.value)+sin(2*.Last.value))
[1] -0.2156507
> acos((-sqrt(17)-1)/8)
[1] 2.2658
> (sin(.Last.value)+sin(2*.Last.value))
[1] 1.76745
> (sin(mvr)+sin(2*mvr))
[1] -0.2156507
>
Note that my variable mvr is the value of acos((-sqrt(17)-1)/8).
2 matches
Mail list logo