Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
def dividesByZero = { double n, double d ->
|
||||
assert ! n.infinite : 'Algorithm fails if the numerator is already infinite.'
|
||||
(n/d).infinite || (n/d).naN
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
((3d)..(0d)).each { i ->
|
||||
((2d)..(0d)).each { j ->
|
||||
println "${i}/${j} divides by zero? " + dividesByZero(i,j)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue