[SystemSafety] Accuracy of COVID modeling code

Peter Bernard Ladkin ladkin at causalis.com
Sat May 9 17:27:12 CEST 2020



On 2020-05-09 15:51 , Derek M Jones wrote:
> 
>> Consider an example from Goldberg's survey which you reference, when a programmer writes "z := x^2 -
>> y^2" , exactly what is it that "correctly uses the FPU" to ensure that z gets an appropriate and
>> accurate value?
>>
> All the language specifications I am familiar with are very clear,
> implement what the code says.  In your example, it's always do the multiples, and then
> the subtracts.
Thank you. That demonstrates clearly that the accuracy of the FP performed depends on the language,
as I was saying.

It seems to me that David is also agreeing.

It was obvious to anyone doing scientific computing in the 1970's that the accuracy of FP
computations was dependent on the HLL used. Most people used Fortran for numerics, and no one used
Cobol, C or Lisp. That is, amongst other things, because the Fortran people paid a lot of attention
to floating point computation, and C programmers were at the time more interested in other things.
That started evening out in the 1980's when the standard algorithm libraries branched out into
letting themselves be called from various language sources.

The fine points of FP arithmetic crop up almost everywhere, and they are handled very differently in
various programming systems. I don't know for the life of me why anyone would want to claim that
they are language-independent.

What has changed in the last fifty years is mostly:
* that words have gotten a lot longer (that helps some);
* that it is now more widely understood that specific types of computation require specific library
functions to get them right;
* and that these libraries are now available for a variety of HLLs, so exactly how an HLL performs
its FP arithmetic is less sensitive an issue than it used to be.

PBL

Prof. Peter Bernard Ladkin, Bielefeld, Germany
Styelfy Bleibgsnd
Tel+msg +49 (0)521 880 7319  www.rvs-bi.de





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.techfak.uni-bielefeld.de/pipermail/systemsafety/attachments/20200509/f943af78/attachment-0001.sig>


More information about the systemsafety mailing list