Silverfrost Forums

Welcome to our forums

EN12.3 fails if the number to be printed is exactly zero

12 Jan 2026 11:22 #32691

The following code runs correctly with the 32 bit compiler.

program oops64
implicit none
real*8 :: x
  x = 0.d0
  write(*,'(G0)') x
  write(*,'(EN12.3)') x ! ### Run time error with /64
                        ! Floating point divide by zero
end program oops64  

producing

 0.000000000000000   
       0.000E+00

With the 64 bit compiler a run time error occurs at the second print statement.

12 Jan 2026 1:24 #32692

Ken

Thank you for the bug report. This code runs correctly for me. It has not otherwise been reported so I can only assume that it has come out in the wash. I have tested it using the standard release and checking options.

Paul

12 Jan 2026 1:48 (Edited: 12 Jan 2026 2:07) #32693

Paul,

I agree this comes as a big surprise! Does this help?

Silverfrost 64-bit exception report on C:\Users\kenneth smith\OneDrive\Documents\BESSEL\FreeFormat3.exe Thu Jan 1 00:00:00 1970

Floating point divide by zero (c000008e) at address 7ffe6969782a

Within file KERNELBASE.dll In RaiseException at address 8A In fmodf at address B35 Within file ucrtbase.dll In memcpy at address 4D62 In acos at address 330 In acos at address 2CB In log10 at address 536 In _fsu at address AA6E Within file CLEARWIN64.DLL Within file FreeFormat3.exe in OOPS64 at address eb

RAX = 0000000000000000 RBX = 000000000240d220 RCX = 0000000000000000 RDX = 0000000000000000 RBP = 0000000000000001 RSI = 0000000000000000 RDI = 00000000c000008e RSP = 000000000240d0e0 R8 = 0000000000000000 R9 = 0000000000000000 R10 = 0000000000000000 R11 = 0000000000000000 R12 = 0000000000000000 R13 = 0000000000006000 R14 = 0000000000000001 R15 = 0000000000000001

7ffe6969782a) db 0f,1f,44,00,00

See also this screenshot - definitely using FTN9.20:

https://www.dropbox.com/scl/fi/d9pqde75ubqllkg2j4cx4/Screenshot-2026-01-12-140250.jpg?rlkey=58h9ozipqad4fjavfkiisbwzx&st=866fajrm&dl=0

12 Jan 2026 2:16 #32694

Thank you. It does not make any sense to me (why would it call acos for example?). Let's see what happens when you get the next interim release.

12 Jan 2026 2:44 #32696

Me neither, if I compile and run the code on my old machine acos and asin both become log2 !

Simple fix, I will use ES in place of EN for the time being.

15 Jan 2026 7:10 #32706

I have the same problem. Unfortunately I have many EN and ES statements in my programs. And furthermore the EN format is quite useful for displaying physical units.

15 Jan 2026 7:35 #32708

I will aim to explore this further. Are you running Windows 11 with automatic updates?

15 Jan 2026 8:03 #32710

Yes, I am using Windows 11. Updates are managed by the IT department of my company.

15 Jan 2026 12:12 (Edited: 15 Jan 2026 12:27) #32711

On my machine, which has automatic updates ON, winver returns

Microsoft Windows 11 Pro Version 25H2 (OS build 26200.7623)

Please login to reply.