Very true, and we had a recent demonstration of this in a thread here. The compiler’s built-in intrinsic function index had a bug, but the Gfortran RTL intrinsic index worked correctly. Whether the bug was visible or not depended on the optimization level specified to the compiler. At low optimization levels, the compiler may choose the RTL routine, but at a higher optimization level it may do the evaluation of a constant expression at compile time using the built-in library routine.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Wrong (strange outputs) of real numbers | 27 | 1508 | April 26, 2023 | |
Should 0.0/0.0 be NaN? | 17 | 912 | March 10, 2024 | |
What to do about this: ACOS on 32Bit gives 1.490116E-008 and on 64Bit gives 0.000000
|
15 | 524 | September 1, 2022 | |
Fortran port of the Bessels.jl library | 41 | 2081 | November 22, 2022 | |
Nearest(huge(1.0), 1.0)? | 20 | 444 | January 10, 2025 |