Menu

#2 Floating point number format

closed
nobody
None
5
2019-05-23
2012-10-24
No

The format used for floating point numbers in solution files uses the strange fortran convention to have the exponent formatted with two digits only. This means that the following are correct, standard fortran outputs of double precision numbers taken from an AUTO solution file:
3.24607101372E-32
3.91031854533-148
This is to say that the "E" is missing if the exponent gets to 3 digits. This causes quite some trouble if you want to read that data e.g. in C++. The problem may not look so vital, but it took a lot of my time to find the reason for strange failures of my C++ code.

I would suggest to change the floating point number format from e.g.
7ES19.10
to
7ES19.10E3.
This uses 3 digits for the exponent:
3.2460710137E-032
3.9103185453E-148

I am not sure if for AUTO this would be just a small change or a cause of backward compatibility issues. Anyway, for me it seems to work fine. All I needed to do was adding "E3" to all floating point formats in bvp.f90, as I am only doing BVPs.

Discussion

  • Bart Oldeman

    Bart Oldeman - 2019-05-23

    This was done in 2013 in the SVN here and now at https://github.com/auto-07p

     
  • Bart Oldeman

    Bart Oldeman - 2019-05-23
    • status: open --> closed
    • Group: --> Next Release (example)
     

Log in to post a comment.