Can't divide by small durations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
Research direction
Start at tick.alpha.interval/divide in interval.cljc around lines 900-901, using the three duration expressions from the issue to reproduce the ArithmeticException. Trace the division path and verify that all three examples complete without a divide-by-zero error.
Written by the indexing model from the issue text.
Description
Hey, really nice work on tick.
Seems like these should work:
(t.i/divide (t/new-duration 1 :seconds) (t/new-duration 1 :millis))
(t.i/divide (t/new-duration 1 :seconds) (t/new-duration 1 :micros))
(t.i/divide (t/new-duration 1 :seconds) (t/new-duration 1 :nanos))
Error:
Unhandled java.lang.ArithmeticException
Divide by zero
Numbers.java: 190 clojure.lang.Numbers/divide
core.cljc: 915 tick.core$eval17885$fn__17886/invoke
protocols.cljc: 51 tick.protocols$eval15134$fn__15135$G__15125__15142/invoke
core.cljc: 921 tick.core$eval17889$fn__17890/invoke
protocols.cljc: 48 tick.protocols$eval15106$fn__15107$G__15097__15114/invoke
interval.cljc: 901 tick.alpha.interval$divide/invokeStatic
interval.cljc: 900 tick.alpha.interval$divide/invoke
- Dominant language
- Clojure
- Stars
- 646
- Forks
- 61
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from juxt/tick
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
help wanted
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
interval-calculus
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
t/concur failsMay be free again @malcolmsparks claimed this 2574 days ago, and no pull request is open. Openinterval-calculus
Similar issues
-
.Team/Graphy
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
metabase/metabase#87741 · 1 comment ·
Maintainers usually reply within 1 day
-
Accumulator with a false initial value does not propagate it again after all facts are retractedPossibly taken @0z5a claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oracle-samples/clara-rules#517 ·
-
internal IOP tokens no changelog no qa
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Misleading WARNING "Failed to find resource type wavc, couldn't enable for streaming" when the WAVOpenbug triage
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
flaky
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day