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 | |
---|---|---|---|---|
Tan lambert's formula | 12 | 1455 | July 7, 2020 | |
What to do about this: ACOS on 32Bit gives 1.490116E-008 and on 64Bit gives 0.000000
|
15 | 524 | September 1, 2022 | |
Fortran runtime math library
|
15 | 2913 | March 10, 2021 | |
Tips to make this toy program faster? | 40 | 1879 | March 15, 2021 | |
Fortran port of the Bessels.jl library | 41 | 2098 | November 22, 2022 |