-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redesign of AstroPeriod
née Period
and other small refactorings
#63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good as far as I can tell 🙂
end | ||
|
||
function apply_offset(s1::Int64, f1, e1, s2::Int64, f2, e2) | ||
isfinite(f1 + f2) || return handle_infinity(f1 + f2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if that's relevant, but isfinite
is false also for NaN
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting question 🤔
Here is Orekit's answer about what to do with NaN
which is kind of unsatisfactory 🤣:
AbsoluteDate date = new AbsoluteDate(2021, 7, 4, 0, 59, 13.123, TimeScalesFactory.getTAI());
AbsoluteDate newDate = new AbsoluteDate(date, Double.NaN);
// Returns 2021-07-04T00:59:NaN
Successful "Conference-Driven Development" 🤣
This a redesign of the
AstroPeriod
(formerly known asPeriod
) type which makes it more compatible with theEpoch
data model and also enables it to track its associated floating point error.