Post AUkUgbDnKhK0YRLSiW by arclight@oldbytes.space
 (DIR) More posts by arclight@oldbytes.space
 (DIR) Post #AUkC4OuiqUMkCi3myG by shelldozer@oldbytes.space
       2023-04-17T12:48:09Z
       
       0 likes, 1 repeats
       
       Quote from the FORTRAN manual for Xerox computers:"The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change."
       
 (DIR) Post #AUkC4PUWhN0PzkoNmK by kingu@mstdn.social
       2023-04-17T13:17:44Z
       
       0 likes, 0 repeats
       
       @shelldozer Let's change the value of pi!!
       
 (DIR) Post #AUkS8hcmouGYevkBTk by RupertReynolds@hachyderm.io
       2023-04-17T16:17:48Z
       
       0 likes, 0 repeats
       
       @kingu @shelldozer It's been tried :-)(Indiana Pi bill 1897)
       
 (DIR) Post #AUkUgZjcrNaxwaDr3Q by arclight@oldbytes.space
       2023-04-17T13:01:43Z
       
       2 likes, 0 repeats
       
       @shelldozer Ironically, the value of PI is much more likely to change if your code doesn't use named constants. A hallmark of most scientific software is the inconsistent precision applied to well-known physical and numerical constants. You're likely to find literal values of ln(2), g, and π written in at least 3 different precisions through a code.
       
 (DIR) Post #AUkUgbDnKhK0YRLSiW by arclight@oldbytes.space
       2023-04-17T13:10:51Z
       
       1 likes, 0 repeats
       
       @shelldozer Want to drive lazy scientists and engineers nuts? Require citation to the canonical source of every physical constant used in a code."What?! Everyone knows g is 9.8 m/s2""Then it should be trivial to provide a reference (points at most recent CODATA release on NIST website)""(Angry typing) FINE. Happy now?""Nice. Now do Boltzmann's constant and every other constant whose value you just pulled out of your ass in this code..."