precision  ( -- n )

published: 9 January 2022 / updated 12 January 2022

Lire cette page en français

 

vocabulary: forth

Pseudo constant determining the display precision of real numbers.

Initial value 6.

If we reduce the display precision of real numbers below 6, the calculations will be when even performed with precision to 6 decimal places.

Example:

precision . \ display 6 
pi f.       \ display 3.141592 
4 set-precision 
precision . \ display 4 
pi f.       \ display 3.1415 

Legal: site web personnel sans commerce / personal site without seling