Skip to content
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

Cleanup the float/int distinction #21

Open
Drup opened this issue Mar 19, 2019 · 4 comments
Open

Cleanup the float/int distinction #21

Drup opened this issue Mar 19, 2019 · 4 comments

Comments

@Drup
Copy link
Member

Drup commented Mar 19, 2019

There is currently Calendar, Calendar.Precise, FCalendar and FCalendar.Precise, all with various float/int combination. The tradeoffs are absolutely not explained in the documentation, and I'm quite sure they don't apply anymore, in these times of ubiquitous 64bit systems. We should be able to clean all that up.

@loxs
Copy link
Collaborator

loxs commented Mar 20, 2019

I was wondering about this too...

@signoles
Copy link
Collaborator

The precise versions are still useful and are not related to 64-bit systems.

In "standard" implementations (Calendar and FCalendar), a calendar is simply represented by a float. It may lead to approximation due to floating-point rounding.

In "precise" implementations (*.Precise), the "date" part is not represented by a float but by an integer, so it remains precise. However, it is more memory-expensive.

If you'd like to remove some of these implementations, I would suggest not to remove the precise version.

@Drup
Copy link
Member Author

Drup commented Mar 20, 2019

@signoles What I had in mind was actually to make the precise version the default. ;)

@signoles
Copy link
Collaborator

then it makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants