Inexactness in julian_day() function.

Open
#167 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Start by locating the Boost.Date_Time julian_day() entry point and inspect how its return value is defined relative to Julian Day Number and Julian Date. Reproduce the three dates from the report, then add regression coverage that makes the intended half-day behavior explicit.

Written by the indexing model from the issue text.

Description

If we compute Julian Day Number for 13th August 2020 using julian_day() we get 2459075.
But actual Julian Day number is 2459074.5.

For 22nd April 1980 using julian_day() we get 2444352.
Actual Julian Day number is 2444351.5.

For 7th September 1999 using julian_day() we get 2451429.
Actual Julian Day number is 2451428.5.

There is always a difference of 0.5 in actual and what julian_day() number is returning.

Verified from

Keisan Online Calculator https://keisan.casio.com/exec/system/1227779487
Neoprogrammics http://neoprogrammics.com/sidereal_time_calculator/index.php

I am working on Boost.Astronomy and Julian Day number of a day is required when calculating Greenwich Sidereal Time.

Dominant language
C++
Stars
70
Forks
99
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/date_time

All issues in boostorg/date_time

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.