Index | Rundeck: E6F40 | Created: Wed Jul 3 03:30:24 EDT 2024 |
Rational.F90
Summary: Author :
Version:
Modules:
- RATIONAL_MOD
-
!---------------------------------------------------------------------------
This module provides a class which implements rational
numbers/arithmetic of the form q = w + n/d where {w,n,d} are
integers. This representation, motivated by the treatment in ESMF,
provides a large range as well as sufficient accuracy to represent
most floating point values.
Times in the model are subclasses of Rational {BaseTime, Time,
TimeInterval}. This ensures that certain ratios are exact integers
and prevents roundoff from inducing incorrect assertions about
beginnings of cyclic periods (e.g. days).
NOTE: arithmetic among nontrivial Rational objects can easily lead to
integer overflow which is not detectable by most compilers.
Global Subroutines:
Depends on the following files:
Used by the following files: