
(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 (- (+ 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 (cos y)) (* z (sin y)))))
(if (<= t_0 -10000000000000.0)
(* x 1.0)
(if (<= t_0 0.999) (cos y) (+ x 1.0)))))
double code(double x, double y, double z) {
double t_0 = (x + cos(y)) - (z * sin(y));
double tmp;
if (t_0 <= -10000000000000.0) {
tmp = x * 1.0;
} else if (t_0 <= 0.999) {
tmp = cos(y);
} else {
tmp = x + 1.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 + cos(y)) - (z * sin(y))
if (t_0 <= (-10000000000000.0d0)) then
tmp = x * 1.0d0
else if (t_0 <= 0.999d0) then
tmp = cos(y)
else
tmp = x + 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + Math.cos(y)) - (z * Math.sin(y));
double tmp;
if (t_0 <= -10000000000000.0) {
tmp = x * 1.0;
} else if (t_0 <= 0.999) {
tmp = Math.cos(y);
} else {
tmp = x + 1.0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + math.cos(y)) - (z * math.sin(y)) tmp = 0 if t_0 <= -10000000000000.0: tmp = x * 1.0 elif t_0 <= 0.999: tmp = math.cos(y) else: tmp = x + 1.0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + cos(y)) - Float64(z * sin(y))) tmp = 0.0 if (t_0 <= -10000000000000.0) tmp = Float64(x * 1.0); elseif (t_0 <= 0.999) tmp = cos(y); else tmp = Float64(x + 1.0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + cos(y)) - (z * sin(y)); tmp = 0.0; if (t_0 <= -10000000000000.0) tmp = x * 1.0; elseif (t_0 <= 0.999) tmp = cos(y); else tmp = x + 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -10000000000000.0], N[(x * 1.0), $MachinePrecision], If[LessEqual[t$95$0, 0.999], N[Cos[y], $MachinePrecision], N[(x + 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x + \cos y\right) - z \cdot \sin y\\
\mathbf{if}\;t\_0 \leq -10000000000000:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;t\_0 \leq 0.999:\\
\;\;\;\;\cos y\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -1e13Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6459.8
Applied rewrites59.8%
Taylor expanded in x around 0
Applied rewrites1.1%
Taylor expanded in x around inf
lower-*.f64N/A
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f6486.5
Applied rewrites86.5%
Taylor expanded in x around inf
Applied rewrites60.1%
if -1e13 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 0.998999999999999999Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
lower-cos.f6496.8
Applied rewrites96.8%
Taylor expanded in x around 0
Applied rewrites94.8%
if 0.998999999999999999 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6483.3
Applied rewrites83.3%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* z (sin y))) (t_1 (- (+ x 1.0) t_0))) (if (<= x -1e-6) t_1 (if (<= x 2.7e-17) (- (cos y) t_0) t_1))))
double code(double x, double y, double z) {
double t_0 = z * sin(y);
double t_1 = (x + 1.0) - t_0;
double tmp;
if (x <= -1e-6) {
tmp = t_1;
} else if (x <= 2.7e-17) {
tmp = cos(y) - t_0;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_0 = z * sin(y)
t_1 = (x + 1.0d0) - t_0
if (x <= (-1d-6)) then
tmp = t_1
else if (x <= 2.7d-17) then
tmp = cos(y) - t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * Math.sin(y);
double t_1 = (x + 1.0) - t_0;
double tmp;
if (x <= -1e-6) {
tmp = t_1;
} else if (x <= 2.7e-17) {
tmp = Math.cos(y) - t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.sin(y) t_1 = (x + 1.0) - t_0 tmp = 0 if x <= -1e-6: tmp = t_1 elif x <= 2.7e-17: tmp = math.cos(y) - t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(z * sin(y)) t_1 = Float64(Float64(x + 1.0) - t_0) tmp = 0.0 if (x <= -1e-6) tmp = t_1; elseif (x <= 2.7e-17) tmp = Float64(cos(y) - t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * sin(y); t_1 = (x + 1.0) - t_0; tmp = 0.0; if (x <= -1e-6) tmp = t_1; elseif (x <= 2.7e-17) tmp = cos(y) - t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + 1.0), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[x, -1e-6], t$95$1, If[LessEqual[x, 2.7e-17], N[(N[Cos[y], $MachinePrecision] - t$95$0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \sin y\\
t_1 := \left(x + 1\right) - t\_0\\
\mathbf{if}\;x \leq -1 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-17}:\\
\;\;\;\;\cos y - t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -9.99999999999999955e-7 or 2.7000000000000001e-17 < x Initial program 100.0%
Taylor expanded in y around 0
Applied rewrites99.3%
if -9.99999999999999955e-7 < x < 2.7000000000000001e-17Initial program 99.8%
Taylor expanded in x around 0
lower-cos.f6499.7
Applied rewrites99.7%
(FPCore (x y z) :precision binary64 (let* ((t_0 (- (+ x 1.0) (* z (sin y))))) (if (<= z -58000000.0) t_0 (if (<= z 3.1e-18) (+ 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 <= -58000000.0) {
tmp = t_0;
} else if (z <= 3.1e-18) {
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 <= (-58000000.0d0)) then
tmp = t_0
else if (z <= 3.1d-18) 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 <= -58000000.0) {
tmp = t_0;
} else if (z <= 3.1e-18) {
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 <= -58000000.0: tmp = t_0 elif z <= 3.1e-18: 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 <= -58000000.0) tmp = t_0; elseif (z <= 3.1e-18) 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 <= -58000000.0) tmp = t_0; elseif (z <= 3.1e-18) 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, -58000000.0], t$95$0, If[LessEqual[z, 3.1e-18], 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 -58000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-18}:\\
\;\;\;\;x + \cos y\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.8e7 or 3.10000000000000007e-18 < z Initial program 99.8%
Taylor expanded in y around 0
Applied rewrites99.0%
if -5.8e7 < z < 3.10000000000000007e-18Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
lower-cos.f6499.7
Applied rewrites99.7%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (sin y) (- z)))) (if (<= z -2.7e+160) t_0 (if (<= z 3.1e+117) (+ x (cos y)) t_0))))
double code(double x, double y, double z) {
double t_0 = sin(y) * -z;
double tmp;
if (z <= -2.7e+160) {
tmp = t_0;
} else if (z <= 3.1e+117) {
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 <= (-2.7d+160)) then
tmp = t_0
else if (z <= 3.1d+117) 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 <= -2.7e+160) {
tmp = t_0;
} else if (z <= 3.1e+117) {
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 <= -2.7e+160: tmp = t_0 elif z <= 3.1e+117: 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 <= -2.7e+160) tmp = t_0; elseif (z <= 3.1e+117) 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 <= -2.7e+160) tmp = t_0; elseif (z <= 3.1e+117) 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, -2.7e+160], t$95$0, If[LessEqual[z, 3.1e+117], 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 -2.7 \cdot 10^{+160}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+117}:\\
\;\;\;\;x + \cos y\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.7e160 or 3.09999999999999975e117 < z Initial program 99.7%
Taylor expanded in z around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-neg.f6477.5
Applied rewrites77.5%
if -2.7e160 < z < 3.09999999999999975e117Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
lower-cos.f6491.7
Applied rewrites91.7%
Final simplification88.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (cos y))))
(if (<= y -1.75e+23)
t_0
(if (<= y 1.7) (fma y (- (* y -0.5) z) (+ x 1.0)) t_0))))
double code(double x, double y, double z) {
double t_0 = x + cos(y);
double tmp;
if (y <= -1.75e+23) {
tmp = t_0;
} else if (y <= 1.7) {
tmp = fma(y, ((y * -0.5) - z), (x + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(x + cos(y)) tmp = 0.0 if (y <= -1.75e+23) tmp = t_0; elseif (y <= 1.7) tmp = fma(y, Float64(Float64(y * -0.5) - z), Float64(x + 1.0)); 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, -1.75e+23], t$95$0, If[LessEqual[y, 1.7], N[(y * N[(N[(y * -0.5), $MachinePrecision] - z), $MachinePrecision] + N[(x + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \cos y\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.7:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot -0.5 - z, x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1.7500000000000001e23 or 1.69999999999999996 < y Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
lower-cos.f6469.6
Applied rewrites69.6%
if -1.7500000000000001e23 < y < 1.69999999999999996Initial 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-+.f6495.9
Applied rewrites95.9%
Final simplification80.4%
(FPCore (x y z) :precision binary64 (if (<= y -2.8e+36) (+ x 1.0) (if (<= y 1.2e+14) (fma y (- (* y -0.5) z) (+ x 1.0)) (+ x 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -2.8e+36) {
tmp = x + 1.0;
} else if (y <= 1.2e+14) {
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 <= -2.8e+36) tmp = Float64(x + 1.0); elseif (y <= 1.2e+14) 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, -2.8e+36], N[(x + 1.0), $MachinePrecision], If[LessEqual[y, 1.2e+14], 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 -2.8 \cdot 10^{+36}:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot -0.5 - z, x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if y < -2.8000000000000001e36 or 1.2e14 < y Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6447.5
Applied rewrites47.5%
if -2.8000000000000001e36 < y < 1.2e14Initial 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-+.f6492.1
Applied rewrites92.1%
(FPCore (x y z) :precision binary64 (if (<= y -1.85e+39) (+ x 1.0) (if (<= y 4.5e+53) (- x (fma y z -1.0)) (+ x 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.85e+39) {
tmp = x + 1.0;
} else if (y <= 4.5e+53) {
tmp = x - fma(y, z, -1.0);
} else {
tmp = x + 1.0;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -1.85e+39) tmp = Float64(x + 1.0); elseif (y <= 4.5e+53) 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, -1.85e+39], N[(x + 1.0), $MachinePrecision], If[LessEqual[y, 4.5e+53], N[(x - N[(y * z + -1.0), $MachinePrecision]), $MachinePrecision], N[(x + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+39}:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+53}:\\
\;\;\;\;x - \mathsf{fma}\left(y, z, -1\right)\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if y < -1.85000000000000006e39 or 4.5000000000000002e53 < y Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6448.9
Applied rewrites48.9%
if -1.85000000000000006e39 < y < 4.5000000000000002e53Initial 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.f6486.4
Applied rewrites86.4%
(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-+.f6463.7
Applied rewrites63.7%
(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-+.f6463.7
Applied rewrites63.7%
Taylor expanded in x around 0
Applied rewrites18.5%
herbie shell --seed 2024233
(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))))