Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Small number format

ferrad01
Principiante
736 Visualizações
I have a small number which I writing to a file with:

FORMAT (A14,1P,D22.12)

The number gets written as:
5.148200387154-130

ie. without the "D"

When I try to read it, it fails. Why is the "D" not being written? I guess it has something to do with the exponent being bigger than 99.


0 Kudos
3 Respostas
ferrad01
Principiante
736 Visualizações
Actually if I read with D22.12 it reads OK, my read format statement was old. But it is rather strange.
Steven_L_Intel1
Funcionário
736 Visualizações
The standard requires this behavior. You can get around it by using E22.12E3 for the format. Yes, you must give up on D for the exponent letter. Fortran will read that string, but other languages may not.
jimdempseyatthecove
Colaborador honorário III
736 Visualizações
>>Yes, you must give up on D for the exponent letter. Fortran will read that string, but other languages may not.

Like Excel
Responder