-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We need to provide these IEEE754-2019 functions #32877
Comments
See also #6148 |
Is there a corresponding section for constants which should defined? |
There is no such section in the current standard; however some constants should be available at their most accurate values for given representations and under the various rounding mode to comply best. These come to mind (and there are others which would be advantageous):
A finite IEEE754 floating point value is constructible using |
also missing is
|
Should -x call 0 - x or negate? |
with the above this (which is important for proper propagation of NaNs) would hold
[it does not in Julia v1.2].
[this signbit distinction holds in Julia 1.2]
with that, proper NaN propagation over arithmetic expressions needs two things (ii) see following (Julia 1.2 does have this property)
If this hold, one may determine if a calculation which results in a value that |
So we have to fix
|
The use of The difficulty with |
also [Julia 1.2] does not do this, although the standard specifies the following behavior What happens with
in addition to the handling of
|
"Implementations shall provide the following non-computational operations for all supported [floating point] arithmetic formats " another missing mandated function is
and we need
regarding (5.iii), in this case our implementation should order according to the constructed "signed payload" values |
Should all of these go into |
regarding section 5.5.1 Sign bit operations note section 6.3 The sign bit When either an input or result is a NaN, this standard does not interpret the sign of a NaN. However, operations on bit strings — copy, negate, abs, copySign — specify the sign bit of a NaN result, sometimes based upon the sign bit of a NaN operand. The logical predicates totalOrder and isSignMinus are also affected by the sign bit of a NaN operand. For all other operations, this standard does not specify the sign bit of a NaN result, even when there is only one input NaN, or when the NaN is produced from an invalid operation. [however, I find this to be unhelpful :)] |
Do you want to say Julia fully embraces IEEE 754-2019? If so, then they belong in Base. |
from IEEE 754-2019: sec 9.2 Additional mathematical operations
"Language standards should define, to be implemented according to this subclause, as many of the operations in Table 9.1 as is appropriate to the language. As with other operations of this standard, the names of the operations in Table 9.1 do not necessarily correspond to the names that any particular programming language would use. In this subclause the domain of an operation is that subset of the affinely extended reals for which the corresponding mathematical function is well defined. A conforming operation shall return results correctly rounded for the applicable rounding direction for all operands in its domain."
these functions include
there are short tables of required
y = f(x) where x in {±0, ±∞}
for many of these functions
The text was updated successfully, but these errors were encountered: