Re: Rounding off double precision



On Mon, 31 Mar 2008 05:46:41 -0700 (PDT), Bamm <bammster@xxxxxxxxx> wrote:

-|> For Fortran 77 define Floor as:
-|> DINT(X)=X-DMOD(X,1.D0)
-|> FLOOR(X)=DINT(X)-DMOD(2.D0+DSIGN(1.D0,X),3.D0)
-|
-|What is DMOD and DINT, and how are they different from MOD and INT?
-|Thanks.
These force Double Precision versions of MOD and AINT to be used.
-|
-|Btw, the problem has been solved. But I am looking at your suggestion
-|as it might lead to something better.

.



Relevant Pages

  • Re: Rounding off double precision
    ... What is DMOD and DINT, and how are they different from MOD and INT? ... Btw, ...
    (comp.lang.fortran)
  • Re: 12 hour clock and offset problem
    ... not violate precision in time based on precise longitude location. ... even more complex if adjustment is made including seconds. ... is lessened by use of the int() function within perl core. ...
    (comp.lang.perl.misc)
  • Re: double to int conversion yields strange results
    ... giving me two different values for the int. ... the question raised is not about the precision of the ... is done in extended precision. ... It is the conversion to 'double' before the conversion to 'int' that ...
    (comp.lang.c)
  • Re: byte + byte -> int
    ... is in range for an int, but allows the line ... overflow, and the rules specifically address overflow. ... it thinks precision might be lost in a down-conversion. ... had one nice feature that our sleek fast modern machines have lost: ...
    (comp.lang.java.programmer)
  • Re: test whether a double is even?
    ... > On my machine an int is 32 bits, so I would lose precision by converting ... Your original question was about testing a number if it's ... course you may loose precision casting a big number to int, short, or char, ...
    (comp.programming)