[J3] [SC22WG5.6473] raising a negative real value to a real power is prohibited
Jeff Hammond
jehammond at nvidia.com
Wed Aug 23 12:21:08 UTC 2023
Do I understand the following text correctly, that is, that the following program is prohibited, even though it perfectly well-defined mathematically?
“10.1.5.2.4 Evaluation of numeric intrinsic operations
The execution of any numeric operation whose result is not defined by the arithmetic used by the processor is prohibited. Raising a negative real value to a real power is prohibited.”
program main
implicit none
real :: x, y
x = -2.0
y = 2.0
print*,x**y
end program main
The first sentence is completely reasonable and seems sufficient to cover the problematic cases. I do not understand why the second sentence is necessary.
Thanks,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230823/e8eff060/attachment.htm>
More information about the J3
mailing list