<< Back to previous view

[CLJ-1350] (/ 1 3) returns Ratio 31/3 Created: 14/Feb/14  Updated: 14/Feb/14  Resolved: 14/Feb/14

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.5
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Hooze It Assignee: Unassigned
Resolution: Not Reproducible Votes: 0
Labels: None

openSuSE 13.1


(/ 1 3) incorrectly returns the Ratio 31/3. Other numbers, such as (/ 1 4), work as expected. This could be worked around by using Java interop, but I don't think / it is functioning correctly in this case.

Comment by Hooze It [ 14/Feb/14 1:25 AM ]

$ lein version
Leiningen 2.3.4 on Java 1.7.0_51 OpenJDK 64-Bit Server VM

Comment by Nicola Mometto [ 14/Feb/14 5:35 AM ]

I cannot reproduce this on clojure 1.5.1 or 1.6.0-master-SNAPSHOT

Comment by Alex Miller [ 14/Feb/14 8:14 AM ]

I also could not reproduce on 1.5 or 1.6. Please provide more information on your Clojure environment ({\*clojure-version\*} and also verify that you're not seeing printing obscuring your repl output or something.

user=> *clojure-version*
{:major 1, :minor 5, :incremental 1, :qualifier nil}
user=> (def x (/ 1 3))
user=> (numerator x)
user=> (denominator x)
user=> x
Comment by Hooze It [ 14/Feb/14 12:01 PM ]

Today I'm unable to reproduce this behavior, although yesterday I could!? I'm so embarrassed :-*>

Thanks for closing.

Generated at Sat Sep 23 04:21:48 CDT 2017 using JIRA 4.4#649-r158309.