
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (/ a (- -1.0 (- t z))) (- y z) x))
double code(double x, double y, double z, double t, double a) {
return fma((a / (-1.0 - (t - z))), (y - z), x);
}
function code(x, y, z, t, a) return fma(Float64(a / Float64(-1.0 - Float64(t - z))), Float64(y - z), x) end
code[x_, y_, z_, t_, a_] := N[(N[(a / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{a}{-1 - \left(t - z\right)}, y - z, x\right)
\end{array}
Initial program 98.1%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-/.f64N/A
clear-numN/A
distribute-lft-neg-inN/A
clear-numN/A
lift-/.f64N/A
distribute-frac-neg2N/A
lower-fma.f64N/A
Applied rewrites98.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -45.0)
(fma (/ a t) z x)
(if (<= t -3.35e-130)
(fma (fma y t (- y)) a x)
(if (<= t -1.05e-291)
(- x a)
(if (<= t 1.0) (- x (* y a)) (fma (/ y t) (- a) x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -45.0) {
tmp = fma((a / t), z, x);
} else if (t <= -3.35e-130) {
tmp = fma(fma(y, t, -y), a, x);
} else if (t <= -1.05e-291) {
tmp = x - a;
} else if (t <= 1.0) {
tmp = x - (y * a);
} else {
tmp = fma((y / t), -a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -45.0) tmp = fma(Float64(a / t), z, x); elseif (t <= -3.35e-130) tmp = fma(fma(y, t, Float64(-y)), a, x); elseif (t <= -1.05e-291) tmp = Float64(x - a); elseif (t <= 1.0) tmp = Float64(x - Float64(y * a)); else tmp = fma(Float64(y / t), Float64(-a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -45.0], N[(N[(a / t), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, -3.35e-130], N[(N[(y * t + (-y)), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, -1.05e-291], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * (-a) + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -45:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{t}, z, x\right)\\
\mathbf{elif}\;t \leq -3.35 \cdot 10^{-130}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, t, -y\right), a, x\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-291}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, -a, x\right)\\
\end{array}
\end{array}
if t < -45Initial program 98.5%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-neg.f6489.6
Applied rewrites89.6%
Taylor expanded in y around inf
Applied rewrites15.2%
Taylor expanded in y around 0
Applied rewrites75.5%
if -45 < t < -3.34999999999999993e-130Initial program 99.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6481.8
Applied rewrites81.8%
Taylor expanded in t around 0
Applied rewrites81.8%
if -3.34999999999999993e-130 < t < -1.05e-291Initial program 96.5%
Taylor expanded in z around inf
lower--.f6481.1
Applied rewrites81.1%
if -1.05e-291 < t < 1Initial program 97.8%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6498.0
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites68.5%
if 1 < t Initial program 97.9%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-neg.f6492.1
Applied rewrites92.1%
Taylor expanded in z around 0
Applied rewrites88.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -110.0)
(fma (/ a (- t)) (- y z) x)
(if (<= t 32000000.0)
(fma (/ a (- z 1.0)) (- y z) x)
(fma (/ (- y z) t) (- a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -110.0) {
tmp = fma((a / -t), (y - z), x);
} else if (t <= 32000000.0) {
tmp = fma((a / (z - 1.0)), (y - z), x);
} else {
tmp = fma(((y - z) / t), -a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -110.0) tmp = fma(Float64(a / Float64(-t)), Float64(y - z), x); elseif (t <= 32000000.0) tmp = fma(Float64(a / Float64(z - 1.0)), Float64(y - z), x); else tmp = fma(Float64(Float64(y - z) / t), Float64(-a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -110.0], N[(N[(a / (-t)), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 32000000.0], N[(N[(a / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * (-a) + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -110:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{-t}, y - z, x\right)\\
\mathbf{elif}\;t \leq 32000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z - 1}, y - z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{t}, -a, x\right)\\
\end{array}
\end{array}
if t < -110Initial program 98.5%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-/.f64N/A
clear-numN/A
distribute-lft-neg-inN/A
clear-numN/A
lift-/.f64N/A
distribute-frac-neg2N/A
lower-fma.f64N/A
Applied rewrites99.4%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6489.7
Applied rewrites89.7%
if -110 < t < 3.2e7Initial program 98.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-/.f64N/A
clear-numN/A
distribute-lft-neg-inN/A
clear-numN/A
lift-/.f64N/A
distribute-frac-neg2N/A
lower-fma.f64N/A
Applied rewrites98.1%
Taylor expanded in t around 0
lower--.f6497.9
Applied rewrites97.9%
if 3.2e7 < t Initial program 97.8%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-neg.f6493.3
Applied rewrites93.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ z (- (- t -1.0) z)) a x)))
(if (<= z -1.8e-39)
t_1
(if (<= z 1.02e+29) (fma (/ y (- -1.0 t)) a x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / ((t - -1.0) - z)), a, x);
double tmp;
if (z <= -1.8e-39) {
tmp = t_1;
} else if (z <= 1.02e+29) {
tmp = fma((y / (-1.0 - t)), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / Float64(Float64(t - -1.0) - z)), a, x) tmp = 0.0 if (z <= -1.8e-39) tmp = t_1; elseif (z <= 1.02e+29) tmp = fma(Float64(y / Float64(-1.0 - t)), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / N[(N[(t - -1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]}, If[LessEqual[z, -1.8e-39], t$95$1, If[LessEqual[z, 1.02e+29], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{\left(t - -1\right) - z}, a, x\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.8e-39 or 1.0200000000000001e29 < z Initial program 96.1%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6488.4
Applied rewrites88.4%
if -1.8e-39 < z < 1.0200000000000001e29Initial program 99.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6492.8
Applied rewrites92.8%
Final simplification90.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.25e-26) (fma (/ a z) (- y z) x) (if (<= z 8.2e+79) (fma (/ y (- -1.0 t)) a x) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.25e-26) {
tmp = fma((a / z), (y - z), x);
} else if (z <= 8.2e+79) {
tmp = fma((y / (-1.0 - t)), a, x);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.25e-26) tmp = fma(Float64(a / z), Float64(y - z), x); elseif (z <= 8.2e+79) tmp = fma(Float64(y / Float64(-1.0 - t)), a, x); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.25e-26], N[(N[(a / z), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 8.2e+79], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, y - z, x\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.2499999999999999e-26Initial program 98.3%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-/.f64N/A
clear-numN/A
distribute-lft-neg-inN/A
clear-numN/A
lift-/.f64N/A
distribute-frac-neg2N/A
lower-fma.f64N/A
Applied rewrites99.3%
Taylor expanded in z around inf
lower-/.f6482.0
Applied rewrites82.0%
if -2.2499999999999999e-26 < z < 8.2e79Initial program 99.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6490.1
Applied rewrites90.1%
if 8.2e79 < z Initial program 92.5%
Taylor expanded in z around inf
lower--.f6483.1
Applied rewrites83.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.8e+80) (- x a) (if (<= z 8.2e+79) (fma (/ y (- -1.0 t)) a x) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+80) {
tmp = x - a;
} else if (z <= 8.2e+79) {
tmp = fma((y / (-1.0 - t)), a, x);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.8e+80) tmp = Float64(x - a); elseif (z <= 8.2e+79) tmp = fma(Float64(y / Float64(-1.0 - t)), a, x); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.8e+80], N[(x - a), $MachinePrecision], If[LessEqual[z, 8.2e+79], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+80}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -4.79999999999999958e80 or 8.2e79 < z Initial program 94.8%
Taylor expanded in z around inf
lower--.f6481.1
Applied rewrites81.1%
if -4.79999999999999958e80 < z < 8.2e79Initial program 99.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6488.3
Applied rewrites88.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.3e+80) (- x a) (if (<= z 7800.0) (- x (* y a)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+80) {
tmp = x - a;
} else if (z <= 7800.0) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.3d+80)) then
tmp = x - a
else if (z <= 7800.0d0) then
tmp = x - (y * a)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+80) {
tmp = x - a;
} else if (z <= 7800.0) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+80: tmp = x - a elif z <= 7800.0: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+80) tmp = Float64(x - a); elseif (z <= 7800.0) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+80) tmp = x - a; elseif (z <= 7800.0) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+80], N[(x - a), $MachinePrecision], If[LessEqual[z, 7800.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+80}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 7800:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.30000000000000004e80 or 7800 < z Initial program 95.5%
Taylor expanded in z around inf
lower--.f6476.7
Applied rewrites76.7%
if -2.30000000000000004e80 < z < 7800Initial program 99.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6473.0
Applied rewrites73.0%
Taylor expanded in z around 0
Applied rewrites70.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -6e+79) (- x a) (if (<= z 1.05e-104) (* 1.0 x) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+79) {
tmp = x - a;
} else if (z <= 1.05e-104) {
tmp = 1.0 * x;
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6d+79)) then
tmp = x - a
else if (z <= 1.05d-104) then
tmp = 1.0d0 * x
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+79) {
tmp = x - a;
} else if (z <= 1.05e-104) {
tmp = 1.0 * x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+79: tmp = x - a elif z <= 1.05e-104: tmp = 1.0 * x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+79) tmp = Float64(x - a); elseif (z <= 1.05e-104) tmp = Float64(1.0 * x); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+79) tmp = x - a; elseif (z <= 1.05e-104) tmp = 1.0 * x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+79], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.05e-104], N[(1.0 * x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+79}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-104}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -5.99999999999999948e79 or 1.04999999999999999e-104 < z Initial program 96.3%
Taylor expanded in z around inf
lower--.f6473.9
Applied rewrites73.9%
if -5.99999999999999948e79 < z < 1.04999999999999999e-104Initial program 99.9%
Taylor expanded in z around inf
lower--.f6446.3
Applied rewrites46.3%
Taylor expanded in x around inf
Applied rewrites46.2%
Taylor expanded in a around 0
Applied rewrites55.6%
(FPCore (x y z t a) :precision binary64 (- x a))
double code(double x, double y, double z, double t, double a) {
return x - a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - a
end function
public static double code(double x, double y, double z, double t, double a) {
return x - a;
}
def code(x, y, z, t, a): return x - a
function code(x, y, z, t, a) return Float64(x - a) end
function tmp = code(x, y, z, t, a) tmp = x - a; end
code[x_, y_, z_, t_, a_] := N[(x - a), $MachinePrecision]
\begin{array}{l}
\\
x - a
\end{array}
Initial program 98.1%
Taylor expanded in z around inf
lower--.f6459.9
Applied rewrites59.9%
(FPCore (x y z t a) :precision binary64 (- a))
double code(double x, double y, double z, double t, double a) {
return -a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = -a
end function
public static double code(double x, double y, double z, double t, double a) {
return -a;
}
def code(x, y, z, t, a): return -a
function code(x, y, z, t, a) return Float64(-a) end
function tmp = code(x, y, z, t, a) tmp = -a; end
code[x_, y_, z_, t_, a_] := (-a)
\begin{array}{l}
\\
-a
\end{array}
Initial program 98.1%
Taylor expanded in z around inf
lower--.f6459.9
Applied rewrites59.9%
Taylor expanded in a around inf
Applied rewrites14.6%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024268
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))