Hence my use of $x*$x rather than $x**2. I doubt there's much difference on modern processors.Oh yes it does make a difference. $x*$x does a multiplication of two numbers, while $x**2 goes the long route of exp(log($x)*2), as ** is a very generic power raising operator. Not only will it take longer (maybe negligible these days, like you say), but most of all: its result will be less precise: both log and exp have quite large margins of error.
In reply to Re^2: probabilistic pi algorithm
by bart
in thread probabilistic pi algorithm
by spx2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |