Coder Social home page Coder Social logo

Comments (7)

Serg-Norseman avatar Serg-Norseman commented on June 12, 2024 1

Time - no problem! :)
I'll just suggest this: I think you don't have to deal with the change of algorithms and format of IEEE 754 doubles. If you want to continue this theme: then, IMHO, you need to develop integer JD and formulas from Wikipedia. I'll too try to find such formulas for missing calendars.

from gedkeeper.

ruslangaripov avatar ruslangaripov commented on June 12, 2024 1

you don't have to deal with the change of algorithms and format of IEEE 754 doubles

Why not? We have already broken one format (double word). Why wouldn't we break an another one? 😈 If we could, of course.

from gedkeeper.

Serg-Norseman avatar Serg-Norseman commented on June 12, 2024 1

Check this out, now unexpectedly found: http://aa.quae.nl/en/reken/juliaansedag.html

from gedkeeper.

Serg-Norseman avatar Serg-Norseman commented on June 12, 2024 1

Fixed by 49999c9

from gedkeeper.

Serg-Norseman avatar Serg-Norseman commented on June 12, 2024

Maybe close the question? How many thought - the new bits are not needed; the reversibility of now generally there, although not very correct.

from gedkeeper.

ruslangaripov avatar ruslangaripov commented on June 12, 2024

To be perfectly frank, we did not fix the problem 😈

The most perfect way to fix it, is to implement the algorithms from Wikipedia operating with integer values. Thus, we eliminate usage of floating-point values. Of course, this will require some time, but I'm ready to lose it, because the game is worth the candle -- we'll get reversible JDN values.

If we select "cracking IEEE Standard 754 standard", we pick yet another an unsteady way, where we change underlying data storage. Just as we already did. But because we have already did that, we may go further and try to use double precision floating-point values instead of current 32-bit value.

So, here is my decision: the current UDN implementation does not give irreversible JDNs. While it must. If GEDKeeper can live with that -- this make our programmer lives easy 😈 But before we might close this ticket completely, we must try to fix it. I'll try to implement the both solutions (integer algorithms and 64-bit floating-point values) at the bitbucket repository. Just give me a time, please!

from gedkeeper.

ruslangaripov avatar ruslangaripov commented on June 12, 2024

What I've implemented using http://aa.quae.nl/en/reken/juliaansedag.html:

  1. JDNs made from dates in Gregorian and Julian calendars are completely reversible.
  2. JDNs made from dates in Islamic calendar are completely reversible (and it looks like, they were).
  3. JDNs made from dates in Jewish calendar are reversible... occasionally (while the current 'Fourmilab Calendar Converter' always gives reversible values for Jewish calendar).

For example,
Jewish date -> JDN -> Jewish date
4682/3/18 -> 2057986 -> 4682/3/18 (no error, okay)
4684/7/1 -> 2058441 -> 4684/7/1 (fine)
3761/10/18 -> 1721426 -> 3761/10/-12 (oops 😕)
3761/12/1 -> 1721468 -> 3761/11/1 (not good again)
3762/11/1 -> 1721791 -> 3762/10/27 (what's that?)
3762/12/2 -> 1721822 -> 3762/11/29 (:finnadie:)
3762/13/29 -> 1721879 -> 3762/13/26 (:bomb:)
3763/1/1 -> 1722234 -> 3763/1/1 (starting from this date everything becomes correct)

from gedkeeper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.