
(FPCore (x y z) :precision binary64 (- (+ x (cos y)) (* z (sin y))))
double code(double x, double y, double z) {
return (x + cos(y)) - (z * sin(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 + cos(y)) - (z * sin(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.cos(y)) - (z * Math.sin(y));
}
def code(x, y, z): return (x + math.cos(y)) - (z * math.sin(y))
function code(x, y, z) return Float64(Float64(x + cos(y)) - Float64(z * sin(y))) end
function tmp = code(x, y, z) tmp = (x + cos(y)) - (z * sin(y)); end
code[x_, y_, z_] := N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \cos y\right) - z \cdot \sin y
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (- (+ x (cos y)) (* z (sin y))))
double code(double x, double y, double z) {
return (x + cos(y)) - (z * sin(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 + cos(y)) - (z * sin(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.cos(y)) - (z * Math.sin(y));
}
def code(x, y, z): return (x + math.cos(y)) - (z * math.sin(y))
function code(x, y, z) return Float64(Float64(x + cos(y)) - Float64(z * sin(y))) end
function tmp = code(x, y, z) tmp = (x + cos(y)) - (z * sin(y)); end
code[x_, y_, z_] := N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \cos y\right) - z \cdot \sin y
\end{array}
(FPCore (x y z) :precision binary64 (- (+ x (cos y)) (* z (sin y))))
double code(double x, double y, double z) {
return (x + cos(y)) - (z * sin(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 + cos(y)) - (z * sin(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.cos(y)) - (z * Math.sin(y));
}
def code(x, y, z): return (x + math.cos(y)) - (z * math.sin(y))
function code(x, y, z) return Float64(Float64(x + cos(y)) - Float64(z * sin(y))) end
function tmp = code(x, y, z) tmp = (x + cos(y)) - (z * sin(y)); end
code[x_, y_, z_] := N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \cos y\right) - z \cdot \sin y
\end{array}
Initial program 99.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (- (+ x 1.0) (* z (sin y))))) (if (<= z -50000000.0) t_0 (if (<= z 0.9) (+ x (cos y)) t_0))))
double code(double x, double y, double z) {
double t_0 = (x + 1.0) - (z * sin(y));
double tmp;
if (z <= -50000000.0) {
tmp = t_0;
} else if (z <= 0.9) {
tmp = x + cos(y);
} else {
tmp = t_0;
}
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) :: t_0
real(8) :: tmp
t_0 = (x + 1.0d0) - (z * sin(y))
if (z <= (-50000000.0d0)) then
tmp = t_0
else if (z <= 0.9d0) then
tmp = x + cos(y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + 1.0) - (z * Math.sin(y));
double tmp;
if (z <= -50000000.0) {
tmp = t_0;
} else if (z <= 0.9) {
tmp = x + Math.cos(y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + 1.0) - (z * math.sin(y)) tmp = 0 if z <= -50000000.0: tmp = t_0 elif z <= 0.9: tmp = x + math.cos(y) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + 1.0) - Float64(z * sin(y))) tmp = 0.0 if (z <= -50000000.0) tmp = t_0; elseif (z <= 0.9) tmp = Float64(x + cos(y)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + 1.0) - (z * sin(y)); tmp = 0.0; if (z <= -50000000.0) tmp = t_0; elseif (z <= 0.9) tmp = x + cos(y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + 1.0), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -50000000.0], t$95$0, If[LessEqual[z, 0.9], N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x + 1\right) - z \cdot \sin y\\
\mathbf{if}\;z \leq -50000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 0.9:\\
\;\;\;\;x + \cos y\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5e7 or 0.900000000000000022 < z Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
if -5e7 < z < 0.900000000000000022Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
lower-cos.f6498.8
Applied rewrites98.8%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (sin y) (- z)))) (if (<= z -9e+106) t_0 (if (<= z 2.3e+119) (+ x (cos y)) t_0))))
double code(double x, double y, double z) {
double t_0 = sin(y) * -z;
double tmp;
if (z <= -9e+106) {
tmp = t_0;
} else if (z <= 2.3e+119) {
tmp = x + cos(y);
} else {
tmp = t_0;
}
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) :: t_0
real(8) :: tmp
t_0 = sin(y) * -z
if (z <= (-9d+106)) then
tmp = t_0
else if (z <= 2.3d+119) then
tmp = x + cos(y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.sin(y) * -z;
double tmp;
if (z <= -9e+106) {
tmp = t_0;
} else if (z <= 2.3e+119) {
tmp = x + Math.cos(y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = math.sin(y) * -z tmp = 0 if z <= -9e+106: tmp = t_0 elif z <= 2.3e+119: tmp = x + math.cos(y) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(sin(y) * Float64(-z)) tmp = 0.0 if (z <= -9e+106) tmp = t_0; elseif (z <= 2.3e+119) tmp = Float64(x + cos(y)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = sin(y) * -z; tmp = 0.0; if (z <= -9e+106) tmp = t_0; elseif (z <= 2.3e+119) tmp = x + cos(y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] * (-z)), $MachinePrecision]}, If[LessEqual[z, -9e+106], t$95$0, If[LessEqual[z, 2.3e+119], N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin y \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+106}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+119}:\\
\;\;\;\;x + \cos y\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -8.9999999999999994e106 or 2.3000000000000001e119 < z Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lower-sin.f6469.2
Applied rewrites69.2%
if -8.9999999999999994e106 < z < 2.3000000000000001e119Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
lower-cos.f6492.1
Applied rewrites92.1%
Final simplification83.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (cos y))))
(if (<= y -0.014)
t_0
(if (<= y 0.36)
(+ 1.0 (fma y (fma y (fma y (* z 0.16666666666666666) -0.5) (- z)) x))
t_0))))
double code(double x, double y, double z) {
double t_0 = x + cos(y);
double tmp;
if (y <= -0.014) {
tmp = t_0;
} else if (y <= 0.36) {
tmp = 1.0 + fma(y, fma(y, fma(y, (z * 0.16666666666666666), -0.5), -z), x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(x + cos(y)) tmp = 0.0 if (y <= -0.014) tmp = t_0; elseif (y <= 0.36) tmp = Float64(1.0 + fma(y, fma(y, fma(y, Float64(z * 0.16666666666666666), -0.5), Float64(-z)), x)); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.014], t$95$0, If[LessEqual[y, 0.36], N[(1.0 + N[(y * N[(y * N[(y * N[(z * 0.16666666666666666), $MachinePrecision] + -0.5), $MachinePrecision] + (-z)), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \cos y\\
\mathbf{if}\;y \leq -0.014:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 0.36:\\
\;\;\;\;1 + \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z \cdot 0.16666666666666666, -0.5\right), -z\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -0.0140000000000000003 or 0.35999999999999999 < y Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
lower-cos.f6462.3
Applied rewrites62.3%
if -0.0140000000000000003 < y < 0.35999999999999999Initial program 100.0%
Taylor expanded in y around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
lower-fma.f64N/A
sub-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6499.3
Applied rewrites99.3%
Final simplification80.5%
(FPCore (x y z)
:precision binary64
(if (<= y -75.0)
(+ x 1.0)
(if (<= y 125.0)
(+ 1.0 (fma y (fma y (fma y (* z 0.16666666666666666) -0.5) (- z)) x))
(+ x 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -75.0) {
tmp = x + 1.0;
} else if (y <= 125.0) {
tmp = 1.0 + fma(y, fma(y, fma(y, (z * 0.16666666666666666), -0.5), -z), x);
} else {
tmp = x + 1.0;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -75.0) tmp = Float64(x + 1.0); elseif (y <= 125.0) tmp = Float64(1.0 + fma(y, fma(y, fma(y, Float64(z * 0.16666666666666666), -0.5), Float64(-z)), x)); else tmp = Float64(x + 1.0); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, -75.0], N[(x + 1.0), $MachinePrecision], If[LessEqual[y, 125.0], N[(1.0 + N[(y * N[(y * N[(y * N[(z * 0.16666666666666666), $MachinePrecision] + -0.5), $MachinePrecision] + (-z)), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(x + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -75:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;y \leq 125:\\
\;\;\;\;1 + \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z \cdot 0.16666666666666666, -0.5\right), -z\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if y < -75 or 125 < y Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6439.6
Applied rewrites39.6%
if -75 < y < 125Initial program 100.0%
Taylor expanded in y around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
lower-fma.f64N/A
sub-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6499.0
Applied rewrites99.0%
(FPCore (x y z) :precision binary64 (if (<= y -50.0) (+ x 1.0) (if (<= y 8400000000.0) (fma y (- (* y -0.5) z) (+ x 1.0)) (+ x 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -50.0) {
tmp = x + 1.0;
} else if (y <= 8400000000.0) {
tmp = fma(y, ((y * -0.5) - z), (x + 1.0));
} else {
tmp = x + 1.0;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -50.0) tmp = Float64(x + 1.0); elseif (y <= 8400000000.0) tmp = fma(y, Float64(Float64(y * -0.5) - z), Float64(x + 1.0)); else tmp = Float64(x + 1.0); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, -50.0], N[(x + 1.0), $MachinePrecision], If[LessEqual[y, 8400000000.0], N[(y * N[(N[(y * -0.5), $MachinePrecision] - z), $MachinePrecision] + N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -50:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;y \leq 8400000000:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot -0.5 - z, x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if y < -50 or 8.4e9 < y Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6440.2
Applied rewrites40.2%
if -50 < y < 8.4e9Initial program 100.0%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f6497.0
Applied rewrites97.0%
(FPCore (x y z) :precision binary64 (if (<= y -3.2) (+ x 1.0) (if (<= y 35000000000000.0) (fma y (- z) (+ x 1.0)) (+ x 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.2) {
tmp = x + 1.0;
} else if (y <= 35000000000000.0) {
tmp = fma(y, -z, (x + 1.0));
} else {
tmp = x + 1.0;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -3.2) tmp = Float64(x + 1.0); elseif (y <= 35000000000000.0) tmp = fma(y, Float64(-z), Float64(x + 1.0)); else tmp = Float64(x + 1.0); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, -3.2], N[(x + 1.0), $MachinePrecision], If[LessEqual[y, 35000000000000.0], N[(y * (-z) + N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;y \leq 35000000000000:\\
\;\;\;\;\mathsf{fma}\left(y, -z, x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if y < -3.2000000000000002 or 3.5e13 < y Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6440.3
Applied rewrites40.3%
if -3.2000000000000002 < y < 3.5e13Initial program 100.0%
lift-cos.f64N/A
lift-+.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
flip3--N/A
frac-2negN/A
distribute-frac-neg2N/A
lower-neg.f64N/A
lower-/.f64N/A
Applied rewrites44.8%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-+.f6496.2
Applied rewrites96.2%
Final simplification68.7%
(FPCore (x y z) :precision binary64 (if (<= y -3.2) (+ x 1.0) (if (<= y 35000000000000.0) (- x (fma y z -1.0)) (+ x 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.2) {
tmp = x + 1.0;
} else if (y <= 35000000000000.0) {
tmp = x - fma(y, z, -1.0);
} else {
tmp = x + 1.0;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -3.2) tmp = Float64(x + 1.0); elseif (y <= 35000000000000.0) tmp = Float64(x - fma(y, z, -1.0)); else tmp = Float64(x + 1.0); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, -3.2], N[(x + 1.0), $MachinePrecision], If[LessEqual[y, 35000000000000.0], N[(x - N[(y * z + -1.0), $MachinePrecision]), $MachinePrecision], N[(x + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;y \leq 35000000000000:\\
\;\;\;\;x - \mathsf{fma}\left(y, z, -1\right)\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if y < -3.2000000000000002 or 3.5e13 < y Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6440.3
Applied rewrites40.3%
if -3.2000000000000002 < y < 3.5e13Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-+l-N/A
lower--.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6496.2
Applied rewrites96.2%
(FPCore (x y z) :precision binary64 (if (<= x -1.0) x (if (<= x 0.055) 1.0 x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.0) {
tmp = x;
} else if (x <= 0.055) {
tmp = 1.0;
} else {
tmp = 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 (x <= (-1.0d0)) then
tmp = x
else if (x <= 0.055d0) then
tmp = 1.0d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.0) {
tmp = x;
} else if (x <= 0.055) {
tmp = 1.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.0: tmp = x elif x <= 0.055: tmp = 1.0 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.0) tmp = x; elseif (x <= 0.055) tmp = 1.0; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.0) tmp = x; elseif (x <= 0.055) tmp = 1.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.0], x, If[LessEqual[x, 0.055], 1.0, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 0.055:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1 or 0.0550000000000000003 < x Initial program 99.9%
lift-cos.f64N/A
lift-+.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
flip3--N/A
frac-2negN/A
distribute-frac-neg2N/A
lower-neg.f64N/A
lower-/.f64N/A
Applied rewrites22.5%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6474.7
Applied rewrites74.7%
remove-double-neg74.7
Applied rewrites74.7%
if -1 < x < 0.0550000000000000003Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6438.0
Applied rewrites38.0%
Taylor expanded in x around 0
Applied rewrites37.1%
(FPCore (x y z) :precision binary64 (+ x 1.0))
double code(double x, double y, double z) {
return x + 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + 1.0d0
end function
public static double code(double x, double y, double z) {
return x + 1.0;
}
def code(x, y, z): return x + 1.0
function code(x, y, z) return Float64(x + 1.0) end
function tmp = code(x, y, z) tmp = x + 1.0; end
code[x_, y_, z_] := N[(x + 1.0), $MachinePrecision]
\begin{array}{l}
\\
x + 1
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6457.8
Applied rewrites57.8%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6457.8
Applied rewrites57.8%
Taylor expanded in x around 0
Applied rewrites18.9%
herbie shell --seed 2024220
(FPCore (x y z)
:name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, B"
:precision binary64
(- (+ x (cos y)) (* z (sin y))))