Ejemplo n.º 1
0
double BasicSia30360Eom::yearsDiff(const bdlt::Date& beginDate,
                                   const bdlt::Date& endDate)
{
#if defined(BSLS_PLATFORM_CMP_GNU) && (BSLS_PLATFORM_CMP_VERSION >= 50301)
    // Storing the result value in a 'volatile double' removes extra-precision
    // available in floating-point registers.

    const volatile double rv =
#else
    const double rv =
#endif
              static_cast<double>(computeDaysDiff(beginDate, endDate)) / 360.0;

    return rv;
}
Ejemplo n.º 2
0
double BasicPsa30360Eom::yearsDiff(const bdlt::Date& beginDate,
                                   const bdlt::Date& endDate)
{
    return static_cast<double>(computeDaysDiff(beginDate, endDate)) / 360.0;
}
Ejemplo n.º 3
0
// CLASS METHODS
int BasicPsa30360Eom::daysDiff(const bdlt::Date& beginDate,
                               const bdlt::Date& endDate)
{
    return computeDaysDiff(beginDate, endDate);
}