Understanding Intrinsic 'Fraction' Function in Fortran

  • Context: Fortran 
  • Thread starter Thread starter PaulDirac
  • Start date Start date
  • Tags Tags
    Response Strange
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
PaulDirac
Messages
33
Reaction score
4
I have tried to use the intrinsic' fraction' function in Fortran but have failed to understand how it works. I thought that it would return the fractional part of a real number, but when I ran a few numbers through it, I got something that was a far cry from what I expected. For example, I tried fraction(10.0) and got 0.625. Can you tell me what's wrong?
 
Physics news on Phys.org