
(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 10 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 (+ (cos y) (- x (* z (sin y)))))
double code(double x, double y, double z) {
return cos(y) + (x - (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 = cos(y) + (x - (z * sin(y)))
end function
public static double code(double x, double y, double z) {
return Math.cos(y) + (x - (z * Math.sin(y)));
}
def code(x, y, z): return math.cos(y) + (x - (z * math.sin(y)))
function code(x, y, z) return Float64(cos(y) + Float64(x - Float64(z * sin(y)))) end
function tmp = code(x, y, z) tmp = cos(y) + (x - (z * sin(y))); end
code[x_, y_, z_] := N[(N[Cos[y], $MachinePrecision] + N[(x - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos y + \left(x - z \cdot \sin y\right)
\end{array}
Initial program 99.9%
Taylor expanded in z around 0 99.9%
mul-1-neg99.9%
sub-neg99.9%
associate-+r-99.9%
+-commutative99.9%
associate-+r-99.9%
Simplified99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (sin y))))
(if (or (<= x -2.8e-13) (not (<= x 1.35e-5)))
(- (+ x 1.0) t_0)
(- (cos y) t_0))))
double code(double x, double y, double z) {
double t_0 = z * sin(y);
double tmp;
if ((x <= -2.8e-13) || !(x <= 1.35e-5)) {
tmp = (x + 1.0) - t_0;
} else {
tmp = cos(y) - 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 = z * sin(y)
if ((x <= (-2.8d-13)) .or. (.not. (x <= 1.35d-5))) then
tmp = (x + 1.0d0) - t_0
else
tmp = cos(y) - t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * Math.sin(y);
double tmp;
if ((x <= -2.8e-13) || !(x <= 1.35e-5)) {
tmp = (x + 1.0) - t_0;
} else {
tmp = Math.cos(y) - t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.sin(y) tmp = 0 if (x <= -2.8e-13) or not (x <= 1.35e-5): tmp = (x + 1.0) - t_0 else: tmp = math.cos(y) - t_0 return tmp
function code(x, y, z) t_0 = Float64(z * sin(y)) tmp = 0.0 if ((x <= -2.8e-13) || !(x <= 1.35e-5)) tmp = Float64(Float64(x + 1.0) - t_0); else tmp = Float64(cos(y) - t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * sin(y); tmp = 0.0; if ((x <= -2.8e-13) || ~((x <= 1.35e-5))) tmp = (x + 1.0) - t_0; else tmp = cos(y) - t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -2.8e-13], N[Not[LessEqual[x, 1.35e-5]], $MachinePrecision]], N[(N[(x + 1.0), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[Cos[y], $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \sin y\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{-13} \lor \neg \left(x \leq 1.35 \cdot 10^{-5}\right):\\
\;\;\;\;\left(x + 1\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\cos y - t\_0\\
\end{array}
\end{array}
if x < -2.8000000000000002e-13 or 1.3499999999999999e-5 < x Initial program 100.0%
Taylor expanded in y around 0 99.9%
if -2.8000000000000002e-13 < x < 1.3499999999999999e-5Initial program 99.8%
Taylor expanded in x around 0 99.4%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -7.5e+26) (not (<= z 2.5e-38))) (- (+ x 1.0) (* z (sin y))) (+ (cos y) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7.5e+26) || !(z <= 2.5e-38)) {
tmp = (x + 1.0) - (z * sin(y));
} else {
tmp = cos(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 ((z <= (-7.5d+26)) .or. (.not. (z <= 2.5d-38))) then
tmp = (x + 1.0d0) - (z * sin(y))
else
tmp = cos(y) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7.5e+26) || !(z <= 2.5e-38)) {
tmp = (x + 1.0) - (z * Math.sin(y));
} else {
tmp = Math.cos(y) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7.5e+26) or not (z <= 2.5e-38): tmp = (x + 1.0) - (z * math.sin(y)) else: tmp = math.cos(y) + x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7.5e+26) || !(z <= 2.5e-38)) tmp = Float64(Float64(x + 1.0) - Float64(z * sin(y))); else tmp = Float64(cos(y) + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7.5e+26) || ~((z <= 2.5e-38))) tmp = (x + 1.0) - (z * sin(y)); else tmp = cos(y) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.5e+26], N[Not[LessEqual[z, 2.5e-38]], $MachinePrecision]], N[(N[(x + 1.0), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+26} \lor \neg \left(z \leq 2.5 \cdot 10^{-38}\right):\\
\;\;\;\;\left(x + 1\right) - z \cdot \sin y\\
\mathbf{else}:\\
\;\;\;\;\cos y + x\\
\end{array}
\end{array}
if z < -7.49999999999999941e26 or 2.50000000000000017e-38 < z Initial program 99.8%
Taylor expanded in y around 0 99.8%
if -7.49999999999999941e26 < z < 2.50000000000000017e-38Initial program 100.0%
Taylor expanded in z around 0 99.1%
+-commutative99.1%
Simplified99.1%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -3.4e+169) (not (<= z 4.75e+145))) (* (sin y) (- z)) (+ (cos y) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.4e+169) || !(z <= 4.75e+145)) {
tmp = sin(y) * -z;
} else {
tmp = cos(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 ((z <= (-3.4d+169)) .or. (.not. (z <= 4.75d+145))) then
tmp = sin(y) * -z
else
tmp = cos(y) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3.4e+169) || !(z <= 4.75e+145)) {
tmp = Math.sin(y) * -z;
} else {
tmp = Math.cos(y) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.4e+169) or not (z <= 4.75e+145): tmp = math.sin(y) * -z else: tmp = math.cos(y) + x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.4e+169) || !(z <= 4.75e+145)) tmp = Float64(sin(y) * Float64(-z)); else tmp = Float64(cos(y) + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.4e+169) || ~((z <= 4.75e+145))) tmp = sin(y) * -z; else tmp = cos(y) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.4e+169], N[Not[LessEqual[z, 4.75e+145]], $MachinePrecision]], N[(N[Sin[y], $MachinePrecision] * (-z)), $MachinePrecision], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+169} \lor \neg \left(z \leq 4.75 \cdot 10^{+145}\right):\\
\;\;\;\;\sin y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;\cos y + x\\
\end{array}
\end{array}
if z < -3.40000000000000028e169 or 4.74999999999999974e145 < z Initial program 99.8%
Taylor expanded in z around inf 75.2%
mul-1-neg75.2%
*-commutative75.2%
distribute-rgt-neg-in75.2%
Simplified75.2%
if -3.40000000000000028e169 < z < 4.74999999999999974e145Initial program 100.0%
Taylor expanded in z around 0 90.7%
+-commutative90.7%
Simplified90.7%
Final simplification87.4%
(FPCore (x y z) :precision binary64 (if (or (<= y -0.25) (not (<= y 3.05e-33))) (+ (cos y) x) (+ 1.0 (+ x (- (* y (* z (* y (* y 0.16666666666666666)))) (* y z))))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.25) || !(y <= 3.05e-33)) {
tmp = cos(y) + x;
} else {
tmp = 1.0 + (x + ((y * (z * (y * (y * 0.16666666666666666)))) - (y * 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 <= (-0.25d0)) .or. (.not. (y <= 3.05d-33))) then
tmp = cos(y) + x
else
tmp = 1.0d0 + (x + ((y * (z * (y * (y * 0.16666666666666666d0)))) - (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.25) || !(y <= 3.05e-33)) {
tmp = Math.cos(y) + x;
} else {
tmp = 1.0 + (x + ((y * (z * (y * (y * 0.16666666666666666)))) - (y * z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.25) or not (y <= 3.05e-33): tmp = math.cos(y) + x else: tmp = 1.0 + (x + ((y * (z * (y * (y * 0.16666666666666666)))) - (y * z))) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.25) || !(y <= 3.05e-33)) tmp = Float64(cos(y) + x); else tmp = Float64(1.0 + Float64(x + Float64(Float64(y * Float64(z * Float64(y * Float64(y * 0.16666666666666666)))) - Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.25) || ~((y <= 3.05e-33))) tmp = cos(y) + x; else tmp = 1.0 + (x + ((y * (z * (y * (y * 0.16666666666666666)))) - (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.25], N[Not[LessEqual[y, 3.05e-33]], $MachinePrecision]], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision], N[(1.0 + N[(x + N[(N[(y * N[(z * N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.25 \lor \neg \left(y \leq 3.05 \cdot 10^{-33}\right):\\
\;\;\;\;\cos y + x\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x + \left(y \cdot \left(z \cdot \left(y \cdot \left(y \cdot 0.16666666666666666\right)\right)\right) - y \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -0.25 or 3.0500000000000001e-33 < y Initial program 99.9%
Taylor expanded in z around 0 69.9%
+-commutative69.9%
Simplified69.9%
if -0.25 < y < 3.0500000000000001e-33Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
Simplified100.0%
sub-neg100.0%
distribute-rgt-in100.0%
*-commutative100.0%
associate-*l*100.0%
Applied egg-rr100.0%
Final simplification83.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -4.5e+80) (not (<= y 1.15e+148))) (+ x 1.0) (+ x (- 1.0 (* y z)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.5e+80) || !(y <= 1.15e+148)) {
tmp = x + 1.0;
} else {
tmp = x + (1.0 - (y * 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 <= (-4.5d+80)) .or. (.not. (y <= 1.15d+148))) then
tmp = x + 1.0d0
else
tmp = x + (1.0d0 - (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -4.5e+80) || !(y <= 1.15e+148)) {
tmp = x + 1.0;
} else {
tmp = x + (1.0 - (y * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -4.5e+80) or not (y <= 1.15e+148): tmp = x + 1.0 else: tmp = x + (1.0 - (y * z)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -4.5e+80) || !(y <= 1.15e+148)) tmp = Float64(x + 1.0); else tmp = Float64(x + Float64(1.0 - Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -4.5e+80) || ~((y <= 1.15e+148))) tmp = x + 1.0; else tmp = x + (1.0 - (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.5e+80], N[Not[LessEqual[y, 1.15e+148]], $MachinePrecision]], N[(x + 1.0), $MachinePrecision], N[(x + N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+80} \lor \neg \left(y \leq 1.15 \cdot 10^{+148}\right):\\
\;\;\;\;x + 1\\
\mathbf{else}:\\
\;\;\;\;x + \left(1 - y \cdot z\right)\\
\end{array}
\end{array}
if y < -4.50000000000000007e80 or 1.15e148 < y Initial program 99.8%
Taylor expanded in y around 0 55.2%
+-commutative55.2%
Simplified55.2%
if -4.50000000000000007e80 < y < 1.15e148Initial program 99.9%
Taylor expanded in y around 0 79.8%
associate-+r+79.8%
+-commutative79.8%
associate-+l+79.8%
mul-1-neg79.8%
unsub-neg79.8%
Simplified79.8%
Final simplification72.2%
(FPCore (x y z) :precision binary64 (if (<= x -2.8e-13) (+ x 1.0) (if (<= x 430000000.0) (- 1.0 (* y z)) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.8e-13) {
tmp = x + 1.0;
} else if (x <= 430000000.0) {
tmp = 1.0 - (y * z);
} 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 <= (-2.8d-13)) then
tmp = x + 1.0d0
else if (x <= 430000000.0d0) then
tmp = 1.0d0 - (y * z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.8e-13) {
tmp = x + 1.0;
} else if (x <= 430000000.0) {
tmp = 1.0 - (y * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.8e-13: tmp = x + 1.0 elif x <= 430000000.0: tmp = 1.0 - (y * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.8e-13) tmp = Float64(x + 1.0); elseif (x <= 430000000.0) tmp = Float64(1.0 - Float64(y * z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.8e-13) tmp = x + 1.0; elseif (x <= 430000000.0) tmp = 1.0 - (y * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.8e-13], N[(x + 1.0), $MachinePrecision], If[LessEqual[x, 430000000.0], N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{-13}:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;x \leq 430000000:\\
\;\;\;\;1 - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.8000000000000002e-13Initial program 100.0%
Taylor expanded in y around 0 91.3%
+-commutative91.3%
Simplified91.3%
if -2.8000000000000002e-13 < x < 4.3e8Initial program 99.8%
Taylor expanded in y around 0 43.7%
+-commutative43.7%
fma-define43.7%
*-commutative43.7%
Simplified43.7%
Taylor expanded in z around inf 45.2%
mul-1-neg45.2%
distribute-rgt-neg-out45.2%
Simplified45.2%
if 4.3e8 < x Initial program 100.0%
Taylor expanded in x around inf 88.1%
Final simplification70.5%
(FPCore (x y z) :precision binary64 (if (<= x -0.76) x (if (<= x 430000000.0) 1.0 x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.76) {
tmp = x;
} else if (x <= 430000000.0) {
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 <= (-0.76d0)) then
tmp = x
else if (x <= 430000000.0d0) 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 <= -0.76) {
tmp = x;
} else if (x <= 430000000.0) {
tmp = 1.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.76: tmp = x elif x <= 430000000.0: tmp = 1.0 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.76) tmp = x; elseif (x <= 430000000.0) tmp = 1.0; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.76) tmp = x; elseif (x <= 430000000.0) tmp = 1.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.76], x, If[LessEqual[x, 430000000.0], 1.0, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.76:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 430000000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -0.76000000000000001 or 4.3e8 < x Initial program 100.0%
Taylor expanded in x around inf 89.0%
if -0.76000000000000001 < x < 4.3e8Initial program 99.8%
Taylor expanded in y around 0 34.3%
+-commutative34.3%
Simplified34.3%
Taylor expanded in x around 0 33.8%
(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 65.2%
+-commutative65.2%
Simplified65.2%
(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 65.2%
+-commutative65.2%
Simplified65.2%
Taylor expanded in x around 0 16.4%
herbie shell --seed 2024144
(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))))