Ramanujan's constant: Difference between revisions
m
→{{header|Wren}}: Minor tidy
m (→{{header|Wren}}: Minor tidy) |
|||
Line 808:
I've therefore hard-coded a value for pi with 70 decimal places (more than enough for this task) and written a 'big' exponential function using the Taylor series for e(x). The latter requires a lot of iterations and is therefore quite slow (takes about 5 seconds to calculate the Ramanujan constant). However, this is acceptable for a scripting language such as Wren.
<syntaxhighlight lang="
import "./fmt" for Fmt
var pi = "3.1415926535897932384626433832795028841971693993751058209749445923078164"
|