
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
Initial program 99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fma 1.0 z (sin y))) (t_1 (+ (+ x (sin y)) (* z (cos y)))))
(if (<= t_1 -50000000.0)
(+ z x)
(if (<= t_1 -0.1)
t_0
(if (<= t_1 2e-25) (+ (+ z y) x) (if (<= t_1 1.0) t_0 (+ z x)))))))
double code(double x, double y, double z) {
double t_0 = fma(1.0, z, sin(y));
double t_1 = (x + sin(y)) + (z * cos(y));
double tmp;
if (t_1 <= -50000000.0) {
tmp = z + x;
} else if (t_1 <= -0.1) {
tmp = t_0;
} else if (t_1 <= 2e-25) {
tmp = (z + y) + x;
} else if (t_1 <= 1.0) {
tmp = t_0;
} else {
tmp = z + x;
}
return tmp;
}
function code(x, y, z) t_0 = fma(1.0, z, sin(y)) t_1 = Float64(Float64(x + sin(y)) + Float64(z * cos(y))) tmp = 0.0 if (t_1 <= -50000000.0) tmp = Float64(z + x); elseif (t_1 <= -0.1) tmp = t_0; elseif (t_1 <= 2e-25) tmp = Float64(Float64(z + y) + x); elseif (t_1 <= 1.0) tmp = t_0; else tmp = Float64(z + x); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 * z + N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000.0], N[(z + x), $MachinePrecision], If[LessEqual[t$95$1, -0.1], t$95$0, If[LessEqual[t$95$1, 2e-25], N[(N[(z + y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1.0], t$95$0, N[(z + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(1, z, \sin y\right)\\
t_1 := \left(x + \sin y\right) + z \cdot \cos y\\
\mathbf{if}\;t\_1 \leq -50000000:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t\_1 \leq -0.1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;\left(z + y\right) + x\\
\mathbf{elif}\;t\_1 \leq 1:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < -5e7 or 1 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6477.8
Applied rewrites77.8%
if -5e7 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < -0.10000000000000001 or 2.00000000000000008e-25 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < 1Initial program 100.0%
Taylor expanded in y around 0
Applied rewrites98.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6498.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6498.7
Applied rewrites98.7%
Taylor expanded in x around 0
lower-sin.f6497.8
Applied rewrites97.8%
if -0.10000000000000001 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < 2.00000000000000008e-25Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64100.0
Applied rewrites100.0%
Final simplification83.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.3e+80) (not (<= z 9e+121))) (* z (cos y)) (fma 1.0 z (+ (sin y) x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.3e+80) || !(z <= 9e+121)) {
tmp = z * cos(y);
} else {
tmp = fma(1.0, z, (sin(y) + x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -2.3e+80) || !(z <= 9e+121)) tmp = Float64(z * cos(y)); else tmp = fma(1.0, z, Float64(sin(y) + x)); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.3e+80], N[Not[LessEqual[z, 9e+121]], $MachinePrecision]], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision], N[(1.0 * z + N[(N[Sin[y], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+80} \lor \neg \left(z \leq 9 \cdot 10^{+121}\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1, z, \sin y + x\right)\\
\end{array}
\end{array}
if z < -2.30000000000000004e80 or 9.0000000000000007e121 < z Initial program 99.8%
Taylor expanded in y around 0
Applied rewrites59.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6459.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6459.6
Applied rewrites59.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower-cos.f6483.8
Applied rewrites83.8%
if -2.30000000000000004e80 < z < 9.0000000000000007e121Initial program 100.0%
Taylor expanded in y around 0
Applied rewrites96.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6496.8
lift-+.f64N/A
+-commutativeN/A
lower-+.f6496.8
Applied rewrites96.8%
Final simplification92.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.9e+164) (not (<= y 1.4e+120))) (* z (cos y)) (+ (+ z y) x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e+164) || !(y <= 1.4e+120)) {
tmp = z * cos(y);
} else {
tmp = (z + y) + x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-2.9d+164)) .or. (.not. (y <= 1.4d+120))) then
tmp = z * cos(y)
else
tmp = (z + y) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e+164) || !(y <= 1.4e+120)) {
tmp = z * Math.cos(y);
} else {
tmp = (z + y) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.9e+164) or not (y <= 1.4e+120): tmp = z * math.cos(y) else: tmp = (z + y) + x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.9e+164) || !(y <= 1.4e+120)) tmp = Float64(z * cos(y)); else tmp = Float64(Float64(z + y) + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.9e+164) || ~((y <= 1.4e+120))) tmp = z * cos(y); else tmp = (z + y) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.9e+164], N[Not[LessEqual[y, 1.4e+120]], $MachinePrecision]], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision], N[(N[(z + y), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+164} \lor \neg \left(y \leq 1.4 \cdot 10^{+120}\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;\left(z + y\right) + x\\
\end{array}
\end{array}
if y < -2.8999999999999999e164 or 1.4e120 < y Initial program 99.8%
Taylor expanded in y around 0
Applied rewrites55.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6455.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.0
Applied rewrites55.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower-cos.f6451.0
Applied rewrites51.0%
if -2.8999999999999999e164 < y < 1.4e120Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
Final simplification75.3%
(FPCore (x y z) :precision binary64 (if (<= y -1.12e+21) (+ z x) (if (<= y 70.0) (fma (fma (* z y) -0.5 1.0) y (+ z x)) (- x z))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.12e+21) {
tmp = z + x;
} else if (y <= 70.0) {
tmp = fma(fma((z * y), -0.5, 1.0), y, (z + x));
} else {
tmp = x - z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -1.12e+21) tmp = Float64(z + x); elseif (y <= 70.0) tmp = fma(fma(Float64(z * y), -0.5, 1.0), y, Float64(z + x)); else tmp = Float64(x - z); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, -1.12e+21], N[(z + x), $MachinePrecision], If[LessEqual[y, 70.0], N[(N[(N[(z * y), $MachinePrecision] * -0.5 + 1.0), $MachinePrecision] * y + N[(z + x), $MachinePrecision]), $MachinePrecision], N[(x - z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+21}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;y \leq 70:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z \cdot y, -0.5, 1\right), y, z + x\right)\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if y < -1.12e21Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6436.0
Applied rewrites36.0%
if -1.12e21 < y < 70Initial program 100.0%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f6498.0
Applied rewrites98.0%
if 70 < y Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6444.4
Applied rewrites44.4%
Taylor expanded in x around inf
Applied rewrites44.1%
Applied rewrites46.4%
Final simplification71.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -7.6e-137) (not (<= x 5.5e-169))) (+ z x) (+ z y)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7.6e-137) || !(x <= 5.5e-169)) {
tmp = z + x;
} else {
tmp = z + y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-7.6d-137)) .or. (.not. (x <= 5.5d-169))) then
tmp = z + x
else
tmp = z + y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -7.6e-137) || !(x <= 5.5e-169)) {
tmp = z + x;
} else {
tmp = z + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7.6e-137) or not (x <= 5.5e-169): tmp = z + x else: tmp = z + y return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7.6e-137) || !(x <= 5.5e-169)) tmp = Float64(z + x); else tmp = Float64(z + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -7.6e-137) || ~((x <= 5.5e-169))) tmp = z + x; else tmp = z + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7.6e-137], N[Not[LessEqual[x, 5.5e-169]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(z + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{-137} \lor \neg \left(x \leq 5.5 \cdot 10^{-169}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;z + y\\
\end{array}
\end{array}
if x < -7.59999999999999997e-137 or 5.4999999999999994e-169 < x Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6473.8
Applied rewrites73.8%
if -7.59999999999999997e-137 < x < 5.4999999999999994e-169Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6457.6
Applied rewrites57.6%
Taylor expanded in x around 0
Applied rewrites54.8%
Final simplification69.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -8.6e-13) (not (<= x 1.22e-33))) x (+ z y)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -8.6e-13) || !(x <= 1.22e-33)) {
tmp = x;
} else {
tmp = z + y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-8.6d-13)) .or. (.not. (x <= 1.22d-33))) then
tmp = x
else
tmp = z + y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -8.6e-13) || !(x <= 1.22e-33)) {
tmp = x;
} else {
tmp = z + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -8.6e-13) or not (x <= 1.22e-33): tmp = x else: tmp = z + y return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -8.6e-13) || !(x <= 1.22e-33)) tmp = x; else tmp = Float64(z + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -8.6e-13) || ~((x <= 1.22e-33))) tmp = x; else tmp = z + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -8.6e-13], N[Not[LessEqual[x, 1.22e-33]], $MachinePrecision]], x, N[(z + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{-13} \lor \neg \left(x \leq 1.22 \cdot 10^{-33}\right):\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z + y\\
\end{array}
\end{array}
if x < -8.5999999999999997e-13 or 1.22e-33 < x Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6482.8
Applied rewrites82.8%
Applied rewrites41.8%
Taylor expanded in x around -inf
Applied rewrites72.7%
if -8.5999999999999997e-13 < x < 1.22e-33Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6454.8
Applied rewrites54.8%
Taylor expanded in x around 0
Applied rewrites48.5%
Final simplification61.6%
(FPCore (x y z) :precision binary64 (if (<= y 106.0) (+ (+ z y) x) (- x z)))
double code(double x, double y, double z) {
double tmp;
if (y <= 106.0) {
tmp = (z + y) + x;
} else {
tmp = x - z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 106.0d0) then
tmp = (z + y) + x
else
tmp = x - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 106.0) {
tmp = (z + y) + x;
} else {
tmp = x - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 106.0: tmp = (z + y) + x else: tmp = x - z return tmp
function code(x, y, z) tmp = 0.0 if (y <= 106.0) tmp = Float64(Float64(z + y) + x); else tmp = Float64(x - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 106.0) tmp = (z + y) + x; else tmp = x - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 106.0], N[(N[(z + y), $MachinePrecision] + x), $MachinePrecision], N[(x - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 106:\\
\;\;\;\;\left(z + y\right) + x\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if y < 106Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6478.6
Applied rewrites78.6%
if 106 < y Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6444.4
Applied rewrites44.4%
Taylor expanded in x around inf
Applied rewrites44.1%
Applied rewrites46.4%
Final simplification70.0%
(FPCore (x y z) :precision binary64 (if (<= y 2.7e+36) (+ (+ z y) x) (+ z x)))
double code(double x, double y, double z) {
double tmp;
if (y <= 2.7e+36) {
tmp = (z + y) + x;
} else {
tmp = z + x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 2.7d+36) then
tmp = (z + y) + x
else
tmp = z + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 2.7e+36) {
tmp = (z + y) + x;
} else {
tmp = z + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 2.7e+36: tmp = (z + y) + x else: tmp = z + x return tmp
function code(x, y, z) tmp = 0.0 if (y <= 2.7e+36) tmp = Float64(Float64(z + y) + x); else tmp = Float64(z + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 2.7e+36) tmp = (z + y) + x; else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 2.7e+36], N[(N[(z + y), $MachinePrecision] + x), $MachinePrecision], N[(z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{+36}:\\
\;\;\;\;\left(z + y\right) + x\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if y < 2.7000000000000001e36Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6476.9
Applied rewrites76.9%
if 2.7000000000000001e36 < y Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6446.1
Applied rewrites46.1%
Final simplification69.4%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6465.5
Applied rewrites65.5%
Applied rewrites32.6%
Taylor expanded in x around -inf
Applied rewrites43.3%
Final simplification43.3%
herbie shell --seed 2024326
(FPCore (x y z)
:name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, C"
:precision binary64
(+ (+ x (sin y)) (* z (cos y))))