adambard / learnxinyminutes-docs

Code documentation written as code! How novel and totally my idea!
https://learnxinyminutes.com/
Other
11.52k stars 3.36k forks source link

[fortran/en] declares single precision pi without extraneous digits #5175

Closed Beliavsky closed 1 week ago

Beliavsky commented 1 week ago

Addresses https://github.com/adambard/learnxinyminutes-docs/issues/5170.

The previous version had a line

real, parameter :: PI = 3.1415926535897931

that was misleading, since real variables are single precision by default in Fortran and will not store all the digits shown.