MCPcopy Index your code
hub / github.com/clojure/clojure / divide

Method divide

src/jvm/clojure/lang/Numbers.java:182–192  ·  view source on GitHub ↗
(Object x, Object y)

Source from the content-addressed store, hash-verified

180}
181
182static public Number divide(Object x, Object y){
183 if (isNaN(x)){
184 return (Number)x;
185 } else if(isNaN(y)){
186 return (Number)y;
187 }
188 Ops yops = ops(y);
189 if(yops.isZero((Number)y))
190 throw new ArithmeticException("Divide by zero");
191 return ops(x).combine(yops).divide((Number)x, (Number)y);
192}
193
194static public Number quotient(Object x, Object y){
195 Ops yops = ops(y);

Callers 7

matchNumberMethod · 0.95
matchNumberMethod · 0.95
toBigDecimalMethod · 0.95
rationalizeMethod · 0.95
multiplyMethod · 0.95
divideMethod · 0.95
divideMethod · 0.95

Calls 10

isNaNMethod · 0.95
opsMethod · 0.95
isZeroMethod · 0.95
fromBigIntegerMethod · 0.95
gcdMethod · 0.80
divideMethod · 0.65
combineMethod · 0.65
negateMethod · 0.65
equalsMethod · 0.45
doubleValueMethod · 0.45

Tested by

no test coverage detected