Skip to content
Snippets Groups Projects
Commit e244d873 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Do not play ping-pong with ALU and FPU.

* There is no need for moving data to memory to remove fraction bits.
parent a07a60f4
No related branches found
No related tags found
2 merge requests!91Add alternative code path for huge buffers.,!89Miscellaneous fixes and CDI-PIO improvements
......@@ -61,7 +61,7 @@ encode_julday(int calendar, int year, int month, int day)
}
}
int64_t julianDay = (int64_t) (floor(365.25 * iy) + (int64_t) (30.6001 * (im + 1)) + ib + 1720996.5 + day + 0.5);
int64_t julianDay = (int64_t) (floor(365.25 * iy) + trunc(30.6001 * (im + 1)) + ib + 1720996.5 + day + 0.5);
return julianDay;
}
......
......@@ -1164,7 +1164,7 @@ split_timevalue(double timevalue, int timeunit)
{
{
static bool lwarn = true;
if (lwarn && (fabs(timevalue - (int64_t) timevalue) > 0))
if (lwarn && (fabs(timevalue - trunc(timevalue)) > 0))
{
Warning("Fraction of a year is not supported!!");
lwarn = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment