Talk:Almkvist-Giullera formula for pi: Difference between revisions

 
Line 22:
Thanks,
Retired_Build_Engineer
 
:I'm puzzled by this error since, when I run the example (as posted) on my own machine, there's no error and the output is as expected.
 
:Are you perhaps trying to run a modified version?
 
:As far as error handling is concerned in Wren-big, a division by zero error is generally unrecoverable as there is no infinity support for big integers like there is with floating-point. So that's why I've chosen to abort the fiber in line 472. If you were writing an application where you couldn't tolerate the script ending prematurely, then you'd need to run the code in a separate fiber using Fiber.try() and thereby catch any error to give you the opportunity of handling it more gracefully. Note that Wren doesn't support exceptions as such. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 08:19, 2 September 2023 (UTC)
9,482

edits