Content deleted Content added
Rewritten the Groovy implementation |
m Modified Groovy implementation |
||
Line 93:
}
</source>
===[[Groovy (programming language)|Groovy]]===
<source lang="Groovy">
def f(x) {
Math.sqrt(Math.abs(x)) + 5 * x**3
}
def grooVals = []
def scanner = new Scanner(System.in)
Line 104 ⟶ 107:
grooVals = grooVals.reverse()
for (val in grooVals) {
def calcVal =
if (calcVal.isInfinite())
println 'TOO LARGE'
|