Skip to content

Commit

Permalink
Merge pull request #545 from amanotk/master
Browse files Browse the repository at this point in the history
Fixed an issue when IEEE floating-point rounding mode is IEEE_DOWN
  • Loading branch information
jacobwilliams committed May 19, 2024
2 parents c80ef5e + e4bfffc commit fff5372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/json_string_utilities.F90
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ subroutine string_to_integer(str,ival,status_ok)
! Compute how many digits we need to read
ndigits = 2*len_trim(str)
if (ndigits/=0) then
ndigits_digits = floor(log10(real(ndigits)))+1
ndigits_digits = nint(log10(real(ndigits)))+1
allocate(character(kind=CDK,len=ndigits_digits) :: digits)
write(digits,'(I0)') ndigits !gfortran will have a runtime error with * edit descriptor here
! gfortran bug: '*' edit descriptor for ISO_10646 strings does bad stuff.
Expand Down

0 comments on commit fff5372

Please sign in to comment.