|
| 1 | +package xyz.javecs.tools.expr |
| 2 | + |
| 3 | +fun builtIn() = HashMap<String, (Double) -> Double>().apply { |
| 4 | + put("sin", { x -> Math.sin(x) }) |
| 5 | + put("cos", { x -> Math.cos(x) }) |
| 6 | + put("tan", { x -> Math.tan(x) }) |
| 7 | + put("asin", { x -> Math.asin(x) }) |
| 8 | + put("acos", { x -> Math.acos(x) }) |
| 9 | + put("atan", { x -> Math.atan(x) }) |
| 10 | + put("exp", { x -> Math.exp(x) }) |
| 11 | + put("log", { x -> Math.log(x) }) |
| 12 | + put("log10", { x -> Math.log10(x) }) |
| 13 | + put("sqrt", { x -> Math.sqrt(x) }) |
| 14 | + put("cbrt", { x -> Math.cbrt(x) }) |
| 15 | + put("ceil", { x -> Math.ceil(x) }) |
| 16 | + put("floor", { x -> Math.floor(x) }) |
| 17 | + put("rint", { x -> Math.rint(x) }) |
| 18 | + put("abs", { x -> Math.abs(x) }) |
| 19 | + put("ulp", { x -> Math.ulp(x) }) |
| 20 | + put("signum", { x -> Math.signum(x) }) |
| 21 | + put("sinh", { x -> Math.sinh(x) }) |
| 22 | + put("cosh", { x -> Math.cosh(x) }) |
| 23 | + put("tanh", { x -> Math.tanh(x) }) |
| 24 | + put("expm1", { x -> Math.expm1(x) }) |
| 25 | + put("log1p", { x -> Math.log1p(x) }) |
| 26 | +} |
0 commit comments