Math FPCore C Java Python Julia Wolfram TeX \[\left(x + \sin y\right) + z \cdot \cos y
\]
↓
\[\left(x + \sin y\right) + z \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\cos y\right)\right)
\]
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y)))) ↓
(FPCore (x y z)
:precision binary64
(+ (+ x (sin y)) (* z (log1p (expm1 (cos y)))))) double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(y));
}
↓
double code(double x, double y, double z) {
return (x + sin(y)) + (z * log1p(expm1(cos(y))));
}
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
↓
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.log1p(Math.expm1(Math.cos(y))));
}
def code(x, y, z):
return (x + math.sin(y)) + (z * math.cos(y))
↓
def code(x, y, z):
return (x + math.sin(y)) + (z * math.log1p(math.expm1(math.cos(y))))
function code(x, y, z)
return Float64(Float64(x + sin(y)) + Float64(z * cos(y)))
end
↓
function code(x, y, z)
return Float64(Float64(x + sin(y)) + Float64(z * log1p(expm1(cos(y)))))
end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Log[1 + N[(Exp[N[Cos[y], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x + \sin y\right) + z \cdot \cos y
↓
\left(x + \sin y\right) + z \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\cos y\right)\right)
Alternatives Alternative 1 Accuracy 99.9% Cost 26048
\[\left(x + \sin y\right) + z \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\cos y\right)\right)
\]
Alternative 2 Accuracy 99.9% Cost 13248
\[\left(x + \sin y\right) + z \cdot \cos y
\]
Alternative 3 Accuracy 90.7% Cost 7113
\[\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+65} \lor \neg \left(z \leq 2.8 \cdot 10^{+47}\right):\\
\;\;\;\;\left(x + y\right) + z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;\left(x + \sin y\right) + z\\
\end{array}
\]
Alternative 4 Accuracy 82.9% Cost 6988
\[\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+150}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-92}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+85}:\\
\;\;\;\;x + \sin y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Accuracy 89.5% Cost 6985
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+150} \lor \neg \left(z \leq 2.7 \cdot 10^{+188}\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;\left(x + \sin y\right) + z\\
\end{array}
\]
Alternative 6 Accuracy 73.5% Cost 6857
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+150} \lor \neg \left(z \leq 10^{+188}\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\]
Alternative 7 Accuracy 58.7% Cost 720
\[\begin{array}{l}
\mathbf{if}\;x \leq -96:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-73}:\\
\;\;\;\;y + z\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+62}:\\
\;\;\;\;y + z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Accuracy 46.6% Cost 456
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{-8}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-57}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 9 Accuracy 67.1% Cost 192
\[x + z
\]
Alternative 10 Accuracy 43.1% Cost 64
\[x
\]