jsoftware / jsource

J engine source mirror
Other
650 stars 90 forks source link

Improve Format 8!:n (2/2) #61

Open tangentstorm opened 2 years ago

tangentstorm commented 2 years ago

The dyad Format (":) supports any precision:

   0j17 ": 1p1
3.14159265358979312

This allows to export all significant digits. But the number of decimal places in the companion dyad Format (8!:n) is limited to at most 9:

   (8!:0) 1p1
+-----------+
|3.141592654|
+-----------+
   '9' (8!:0) 1p1
+-----------+
|3.141592654|
+-----------+
   '10' (8!:0) 1p1
|domain error
|   '10'    (8!:0)3.14159

Is it possible to increase this limit to at least 17 for 64-bit platforms, and to at least 9 for 32-bit platforms?

-- @jip 07:29, 23 June 2021 (UTC)

jip commented 2 years ago

Cross-reference: [JWiki] System/Interpreter/Requests, Igor Zhuravlov, Wed Jun 23 07:29 UTC 2021.