chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.8k stars 423 forks source link

[Documentation]: Add qualification about exponentiation and `real`/`imag`/`complex` #25660

Open lydia-duncan opened 4 months ago

lydia-duncan commented 4 months ago

Summary of Problem

Description:

This was reported by Damian in our mailing list. He said there:

Some words of wisdom like the following need to be added to the definition of the exponentiation operator (as well as the complex and imag cases being documented):

This operator is unlike other mathematical operators for floating point data which are correctly rounded, i.e. have a rounding error which is not greater than 0.5 ULP (1). At best, exponentiation of a floating point number achieves a rounding error which is for a floating point exponent is guaranteed to not exceed 1 ULP(1) with an underlying robust mathematical library. For the optimized cases of integral exponents of floating point data, the rounding error in most cases does not exceed several ULPs, although that is not guaranteed.

A more succinct version of the above would be better which could reference the above would be good.

damianmoz commented 3 months ago

Rather than add warning which has a negative connotation, I would say qualify.