How to find the closest even number ? 
Author Message
 How to find the closest even number ?

Quote:

>Hello,

>After a division I obtained the double precision number Q.
>Would like to find the closest even number. So, Q=10.5 would
>give 10 and Q=11.2 give 12.
>Could somebody give some suggestions how to do this in
>fortran 77 ?

Divide by 2.0, use the NINT (nearest integer) function, and then
multiply by 2.


Wed, 18 Jun 1902 08:00:00 GMT  
 How to find the closest even number ?
Hello,

After a division I obtained the double precision number Q.
Would like to find the closest even number. So, Q=10.5 would
give 10 and Q=11.2 give 12.
Could somebody give some suggestions how to do this in
Fortran 77 ?

Thankx a lot,

 Marcel



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. number representations (was: even vs. odd numbers)

2. Are we even getting close?

3. Even/odd week number

4. Finding out number of threads or number of open windows in the app

5. Hove to shift page numbers from left to right side depending on even uneven pagenumber

6. determine whether a number is odd or even

7. Cannot find type library even after registering

8. even vs. odd numbers

9. tcl finds close braces when they are in commented lines

10. find closest canvasitem with certain tag

11. extension to canvas find closest command?

12. to close or not to close?

 

 
Powered by phpBB® Forum Software