
(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 17 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 (- x (* (- y z) (/ a (+ 1.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) * (a / (1.0 + (t - z))));
}
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) * (a / (1.0d0 + (t - z))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) * (a / (1.0 + (t - z))));
}
def code(x, y, z, t, a): return x - ((y - z) * (a / (1.0 + (t - z))))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 + Float64(t - z))))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) * (a / (1.0 + (t - z)))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 + N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(y - z\right) \cdot \frac{a}{1 + \left(t - z\right)}
\end{array}
Initial program 96.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6497.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f6497.0
Applied rewrites97.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ a (- 1.0 z)) y))))
(if (<= t -2.1e+20)
(- x (* (/ y t) a))
(if (<= t -3.1e-105)
t_1
(if (<= t -1.95e-221)
(fma (/ z (- 1.0 z)) a x)
(if (<= t 2.8e-23)
t_1
(if (<= t 8.5e+224)
(- x (/ (* a y) t))
(fma (/ a (+ 1.0 t)) z x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((a / (1.0 - z)) * y);
double tmp;
if (t <= -2.1e+20) {
tmp = x - ((y / t) * a);
} else if (t <= -3.1e-105) {
tmp = t_1;
} else if (t <= -1.95e-221) {
tmp = fma((z / (1.0 - z)), a, x);
} else if (t <= 2.8e-23) {
tmp = t_1;
} else if (t <= 8.5e+224) {
tmp = x - ((a * y) / t);
} else {
tmp = fma((a / (1.0 + t)), z, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(a / Float64(1.0 - z)) * y)) tmp = 0.0 if (t <= -2.1e+20) tmp = Float64(x - Float64(Float64(y / t) * a)); elseif (t <= -3.1e-105) tmp = t_1; elseif (t <= -1.95e-221) tmp = fma(Float64(z / Float64(1.0 - z)), a, x); elseif (t <= 2.8e-23) tmp = t_1; elseif (t <= 8.5e+224) tmp = Float64(x - Float64(Float64(a * y) / t)); else tmp = fma(Float64(a / Float64(1.0 + t)), z, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+20], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.1e-105], t$95$1, If[LessEqual[t, -1.95e-221], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 2.8e-23], t$95$1, If[LessEqual[t, 8.5e+224], N[(x - N[(N[(a * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(a / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{a}{1 - z} \cdot y\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+20}:\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.95 \cdot 10^{-221}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+224}:\\
\;\;\;\;x - \frac{a \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{1 + t}, z, x\right)\\
\end{array}
\end{array}
if t < -2.1e20Initial program 94.9%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6470.4
Applied rewrites70.4%
Taylor expanded in t around inf
Applied rewrites70.4%
if -2.1e20 < t < -3.10000000000000014e-105 or -1.9499999999999999e-221 < t < 2.7999999999999997e-23Initial program 97.1%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6495.5
Applied rewrites95.5%
Taylor expanded in y around inf
Applied rewrites80.4%
if -3.10000000000000014e-105 < t < -1.9499999999999999e-221Initial program 99.8%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6485.8
Applied rewrites85.8%
Taylor expanded in t around 0
Applied rewrites85.8%
if 2.7999999999999997e-23 < t < 8.50000000000000046e224Initial program 96.1%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6480.9
Applied rewrites80.9%
Taylor expanded in t around inf
Applied rewrites81.1%
if 8.50000000000000046e224 < t Initial program 99.7%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6492.7
Applied rewrites92.7%
Taylor expanded in z around 0
Applied rewrites87.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a y))))
(if (<= z -6.8e+50)
(- x a)
(if (<= z -3.3e-88)
t_1
(if (<= z -7.9e-227)
(- x (* (/ y t) a))
(if (<= z 2.65e-245)
t_1
(if (<= z 6.5e+47)
(- x (* y (/ a t)))
(fma (/ z (- 1.0 z)) a x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * y);
double tmp;
if (z <= -6.8e+50) {
tmp = x - a;
} else if (z <= -3.3e-88) {
tmp = t_1;
} else if (z <= -7.9e-227) {
tmp = x - ((y / t) * a);
} else if (z <= 2.65e-245) {
tmp = t_1;
} else if (z <= 6.5e+47) {
tmp = x - (y * (a / t));
} else {
tmp = fma((z / (1.0 - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * y)) tmp = 0.0 if (z <= -6.8e+50) tmp = Float64(x - a); elseif (z <= -3.3e-88) tmp = t_1; elseif (z <= -7.9e-227) tmp = Float64(x - Float64(Float64(y / t) * a)); elseif (z <= 2.65e-245) tmp = t_1; elseif (z <= 6.5e+47) tmp = Float64(x - Float64(y * Float64(a / t))); else tmp = fma(Float64(z / Float64(1.0 - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+50], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.3e-88], t$95$1, If[LessEqual[z, -7.9e-227], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e-245], t$95$1, If[LessEqual[z, 6.5e+47], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot y\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+50}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.9 \cdot 10^{-227}:\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+47}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\end{array}
\end{array}
if z < -6.7999999999999997e50Initial program 94.5%
Taylor expanded in z around inf
lower--.f6481.8
Applied rewrites81.8%
if -6.7999999999999997e50 < z < -3.29999999999999994e-88 or -7.9000000000000002e-227 < z < 2.64999999999999998e-245Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.6
Applied rewrites85.6%
Taylor expanded in z around 0
Applied rewrites81.8%
if -3.29999999999999994e-88 < z < -7.9000000000000002e-227Initial program 97.3%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6492.1
Applied rewrites92.1%
Taylor expanded in t around inf
Applied rewrites75.6%
if 2.64999999999999998e-245 < z < 6.49999999999999988e47Initial program 98.3%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6482.2
Applied rewrites82.2%
Taylor expanded in t around inf
Applied rewrites71.9%
Applied rewrites75.0%
if 6.49999999999999988e47 < z Initial program 94.9%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6491.5
Applied rewrites91.5%
Taylor expanded in t around 0
Applied rewrites77.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a y))))
(if (<= z -6.8e+50)
(- x a)
(if (<= z -3.3e-88)
t_1
(if (<= z -7.9e-227)
(- x (* (/ y t) a))
(if (<= z 2.65e-245)
t_1
(if (<= z 6.5e+47) (- x (* y (/ a t))) (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * y);
double tmp;
if (z <= -6.8e+50) {
tmp = x - a;
} else if (z <= -3.3e-88) {
tmp = t_1;
} else if (z <= -7.9e-227) {
tmp = x - ((y / t) * a);
} else if (z <= 2.65e-245) {
tmp = t_1;
} else if (z <= 6.5e+47) {
tmp = x - (y * (a / t));
} 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) :: t_1
real(8) :: tmp
t_1 = x - (a * y)
if (z <= (-6.8d+50)) then
tmp = x - a
else if (z <= (-3.3d-88)) then
tmp = t_1
else if (z <= (-7.9d-227)) then
tmp = x - ((y / t) * a)
else if (z <= 2.65d-245) then
tmp = t_1
else if (z <= 6.5d+47) then
tmp = x - (y * (a / t))
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 t_1 = x - (a * y);
double tmp;
if (z <= -6.8e+50) {
tmp = x - a;
} else if (z <= -3.3e-88) {
tmp = t_1;
} else if (z <= -7.9e-227) {
tmp = x - ((y / t) * a);
} else if (z <= 2.65e-245) {
tmp = t_1;
} else if (z <= 6.5e+47) {
tmp = x - (y * (a / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * y) tmp = 0 if z <= -6.8e+50: tmp = x - a elif z <= -3.3e-88: tmp = t_1 elif z <= -7.9e-227: tmp = x - ((y / t) * a) elif z <= 2.65e-245: tmp = t_1 elif z <= 6.5e+47: tmp = x - (y * (a / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * y)) tmp = 0.0 if (z <= -6.8e+50) tmp = Float64(x - a); elseif (z <= -3.3e-88) tmp = t_1; elseif (z <= -7.9e-227) tmp = Float64(x - Float64(Float64(y / t) * a)); elseif (z <= 2.65e-245) tmp = t_1; elseif (z <= 6.5e+47) tmp = Float64(x - Float64(y * Float64(a / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * y); tmp = 0.0; if (z <= -6.8e+50) tmp = x - a; elseif (z <= -3.3e-88) tmp = t_1; elseif (z <= -7.9e-227) tmp = x - ((y / t) * a); elseif (z <= 2.65e-245) tmp = t_1; elseif (z <= 6.5e+47) tmp = x - (y * (a / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+50], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.3e-88], t$95$1, If[LessEqual[z, -7.9e-227], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e-245], t$95$1, If[LessEqual[z, 6.5e+47], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot y\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+50}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.9 \cdot 10^{-227}:\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+47}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.7999999999999997e50 or 6.49999999999999988e47 < z Initial program 94.7%
Taylor expanded in z around inf
lower--.f6479.7
Applied rewrites79.7%
if -6.7999999999999997e50 < z < -3.29999999999999994e-88 or -7.9000000000000002e-227 < z < 2.64999999999999998e-245Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.6
Applied rewrites85.6%
Taylor expanded in z around 0
Applied rewrites81.8%
if -3.29999999999999994e-88 < z < -7.9000000000000002e-227Initial program 97.3%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6492.1
Applied rewrites92.1%
Taylor expanded in t around inf
Applied rewrites75.6%
if 2.64999999999999998e-245 < z < 6.49999999999999988e47Initial program 98.3%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6482.2
Applied rewrites82.2%
Taylor expanded in t around inf
Applied rewrites71.9%
Applied rewrites75.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+158)
(- x a)
(if (<= z -3.3e-7)
(- x (* (/ (- y) z) a))
(if (<= z 2.65e-245)
(- x (* (- y z) (fma a z a)))
(if (<= z 6.5e+47) (- x (* y (/ a t))) (fma (/ z (- 1.0 z)) a x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+158) {
tmp = x - a;
} else if (z <= -3.3e-7) {
tmp = x - ((-y / z) * a);
} else if (z <= 2.65e-245) {
tmp = x - ((y - z) * fma(a, z, a));
} else if (z <= 6.5e+47) {
tmp = x - (y * (a / t));
} else {
tmp = fma((z / (1.0 - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+158) tmp = Float64(x - a); elseif (z <= -3.3e-7) tmp = Float64(x - Float64(Float64(Float64(-y) / z) * a)); elseif (z <= 2.65e-245) tmp = Float64(x - Float64(Float64(y - z) * fma(a, z, a))); elseif (z <= 6.5e+47) tmp = Float64(x - Float64(y * Float64(a / t))); else tmp = fma(Float64(z / Float64(1.0 - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+158], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.3e-7], N[(x - N[(N[((-y) / z), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e-245], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a * z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+47], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+158}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-7}:\\
\;\;\;\;x - \frac{-y}{z} \cdot a\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-245}:\\
\;\;\;\;x - \left(y - z\right) \cdot \mathsf{fma}\left(a, z, a\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+47}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\end{array}
\end{array}
if z < -3.19999999999999995e158Initial program 92.4%
Taylor expanded in z around inf
lower--.f6495.2
Applied rewrites95.2%
if -3.19999999999999995e158 < z < -3.3000000000000002e-7Initial program 99.7%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6475.1
Applied rewrites75.1%
Taylor expanded in z around inf
Applied rewrites71.1%
if -3.3000000000000002e-7 < z < 2.64999999999999998e-245Initial program 98.6%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.7
Applied rewrites70.7%
Taylor expanded in z around 0
Applied rewrites70.7%
if 2.64999999999999998e-245 < z < 6.49999999999999988e47Initial program 98.3%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6482.2
Applied rewrites82.2%
Taylor expanded in t around inf
Applied rewrites71.9%
Applied rewrites75.0%
if 6.49999999999999988e47 < z Initial program 94.9%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6491.5
Applied rewrites91.5%
Taylor expanded in t around 0
Applied rewrites77.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ 1.0 t) z)))
(if (or (<= y -1.78e+25) (not (<= y 8.5e+135)))
(- x (* (/ y t_1) a))
(fma (/ z t_1) a x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 + t) - z;
double tmp;
if ((y <= -1.78e+25) || !(y <= 8.5e+135)) {
tmp = x - ((y / t_1) * a);
} else {
tmp = fma((z / t_1), a, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(1.0 + t) - z) tmp = 0.0 if ((y <= -1.78e+25) || !(y <= 8.5e+135)) tmp = Float64(x - Float64(Float64(y / t_1) * a)); else tmp = fma(Float64(z / t_1), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]}, If[Or[LessEqual[y, -1.78e+25], N[Not[LessEqual[y, 8.5e+135]], $MachinePrecision]], N[(x - N[(N[(y / t$95$1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(z / t$95$1), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 + t\right) - z\\
\mathbf{if}\;y \leq -1.78 \cdot 10^{+25} \lor \neg \left(y \leq 8.5 \cdot 10^{+135}\right):\\
\;\;\;\;x - \frac{y}{t\_1} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t\_1}, a, x\right)\\
\end{array}
\end{array}
if y < -1.78000000000000005e25 or 8.49999999999999992e135 < y Initial program 94.0%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6493.6
Applied rewrites93.6%
if -1.78000000000000005e25 < y < 8.49999999999999992e135Initial program 98.7%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6489.2
Applied rewrites89.2%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e+50)
(- x a)
(if (<= z -3.3e-88)
(- x (* a y))
(if (<= z 6.5e+47) (- x (* y (/ a t))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+50) {
tmp = x - a;
} else if (z <= -3.3e-88) {
tmp = x - (a * y);
} else if (z <= 6.5e+47) {
tmp = x - (y * (a / t));
} 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 <= (-6.8d+50)) then
tmp = x - a
else if (z <= (-3.3d-88)) then
tmp = x - (a * y)
else if (z <= 6.5d+47) then
tmp = x - (y * (a / t))
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 <= -6.8e+50) {
tmp = x - a;
} else if (z <= -3.3e-88) {
tmp = x - (a * y);
} else if (z <= 6.5e+47) {
tmp = x - (y * (a / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e+50: tmp = x - a elif z <= -3.3e-88: tmp = x - (a * y) elif z <= 6.5e+47: tmp = x - (y * (a / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e+50) tmp = Float64(x - a); elseif (z <= -3.3e-88) tmp = Float64(x - Float64(a * y)); elseif (z <= 6.5e+47) tmp = Float64(x - Float64(y * Float64(a / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e+50) tmp = x - a; elseif (z <= -3.3e-88) tmp = x - (a * y); elseif (z <= 6.5e+47) tmp = x - (y * (a / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+50], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.3e-88], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+47], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+50}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-88}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+47}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.7999999999999997e50 or 6.49999999999999988e47 < z Initial program 94.7%
Taylor expanded in z around inf
lower--.f6479.7
Applied rewrites79.7%
if -6.7999999999999997e50 < z < -3.29999999999999994e-88Initial program 99.7%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6492.7
Applied rewrites92.7%
Taylor expanded in z around 0
Applied rewrites85.2%
if -3.29999999999999994e-88 < z < 6.49999999999999988e47Initial program 98.3%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6488.1
Applied rewrites88.1%
Taylor expanded in t around inf
Applied rewrites66.9%
Applied rewrites69.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.5e+41)
(- x (* (- y z) (/ (- a) z)))
(if (<= z 6.8e+21)
(- x (* (- y z) (/ a (+ 1.0 t))))
(fma (/ z (- (+ 1.0 t) z)) a x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+41) {
tmp = x - ((y - z) * (-a / z));
} else if (z <= 6.8e+21) {
tmp = x - ((y - z) * (a / (1.0 + t)));
} else {
tmp = fma((z / ((1.0 + t) - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e+41) tmp = Float64(x - Float64(Float64(y - z) * Float64(Float64(-a) / z))); elseif (z <= 6.8e+21) tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 + t)))); else tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+41], N[(x - N[(N[(y - z), $MachinePrecision] * N[((-a) / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+21], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+41}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{-a}{z}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 + t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\end{array}
\end{array}
if z < -8.49999999999999938e41Initial program 94.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6494.8
lift-+.f64N/A
+-commutativeN/A
lower-+.f6494.8
Applied rewrites94.8%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6488.7
Applied rewrites88.7%
if -8.49999999999999938e41 < z < 6.8e21Initial program 98.5%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6498.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6498.6
Applied rewrites98.6%
Taylor expanded in z around 0
lower-/.f64N/A
lower-+.f6498.5
Applied rewrites98.5%
if 6.8e21 < z Initial program 95.3%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.6
Applied rewrites90.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e+29) (not (<= z 6.8e+21))) (fma (/ z (- (+ 1.0 t) z)) a x) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+29) || !(z <= 6.8e+21)) {
tmp = fma((z / ((1.0 + t) - z)), a, x);
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e+29) || !(z <= 6.8e+21)) tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e+29], N[Not[LessEqual[z, 6.8e+21]], $MachinePrecision]], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+29} \lor \neg \left(z \leq 6.8 \cdot 10^{+21}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -3.39999999999999981e29 or 6.8e21 < z Initial program 95.1%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6487.8
Applied rewrites87.8%
if -3.39999999999999981e29 < z < 6.8e21Initial program 98.5%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6490.1
Applied rewrites90.1%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e+29) (not (<= z 6.8e+21))) (fma z (/ a (+ (- t z) 1.0)) x) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+29) || !(z <= 6.8e+21)) {
tmp = fma(z, (a / ((t - z) + 1.0)), x);
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e+29) || !(z <= 6.8e+21)) tmp = fma(z, Float64(a / Float64(Float64(t - z) + 1.0)), x); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e+29], N[Not[LessEqual[z, 6.8e+21]], $MachinePrecision]], N[(z * N[(a / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+29} \lor \neg \left(z \leq 6.8 \cdot 10^{+21}\right):\\
\;\;\;\;\mathsf{fma}\left(z, \frac{a}{\left(t - z\right) + 1}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -3.39999999999999981e29 or 6.8e21 < z Initial program 95.1%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6487.8
Applied rewrites87.8%
Applied rewrites84.6%
if -3.39999999999999981e29 < z < 6.8e21Initial program 98.5%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6490.1
Applied rewrites90.1%
Final simplification87.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.15e-51)
(- x (* (- y z) (/ a (- 1.0 z))))
(if (<= z 6.8e+21)
(- x (* (/ y (+ 1.0 t)) a))
(fma (/ z (- (+ 1.0 t) z)) a x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e-51) {
tmp = x - ((y - z) * (a / (1.0 - z)));
} else if (z <= 6.8e+21) {
tmp = x - ((y / (1.0 + t)) * a);
} else {
tmp = fma((z / ((1.0 + t) - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e-51) tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - z)))); elseif (z <= 6.8e+21) tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); else tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e-51], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+21], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-51}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\end{array}
\end{array}
if z < -1.15000000000000001e-51Initial program 95.8%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6488.2
Applied rewrites88.2%
if -1.15000000000000001e-51 < z < 6.8e21Initial program 98.4%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6490.0
Applied rewrites90.0%
if 6.8e21 < z Initial program 95.3%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.6
Applied rewrites90.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+28)
(- x (* (- y z) (/ (- a) z)))
(if (<= z 6.8e+21)
(- x (* (/ y (+ 1.0 t)) a))
(fma (/ z (- (+ 1.0 t) z)) a x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+28) {
tmp = x - ((y - z) * (-a / z));
} else if (z <= 6.8e+21) {
tmp = x - ((y / (1.0 + t)) * a);
} else {
tmp = fma((z / ((1.0 + t) - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+28) tmp = Float64(x - Float64(Float64(y - z) * Float64(Float64(-a) / z))); elseif (z <= 6.8e+21) tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); else tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+28], N[(x - N[(N[(y - z), $MachinePrecision] * N[((-a) / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+21], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+28}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{-a}{z}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\end{array}
\end{array}
if z < -3.7999999999999999e28Initial program 94.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6495.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.0
Applied rewrites95.0%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6487.4
Applied rewrites87.4%
if -3.7999999999999999e28 < z < 6.8e21Initial program 98.5%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6490.1
Applied rewrites90.1%
if 6.8e21 < z Initial program 95.3%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.6
Applied rewrites90.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e+53) (- x a) (if (<= z 6.2e+42) (- x (* (/ y (+ 1.0 t)) a)) (fma (/ z (- 1.0 z)) a x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+53) {
tmp = x - a;
} else if (z <= 6.2e+42) {
tmp = x - ((y / (1.0 + t)) * a);
} else {
tmp = fma((z / (1.0 - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+53) tmp = Float64(x - a); elseif (z <= 6.2e+42) tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); else tmp = fma(Float64(z / Float64(1.0 - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+53], N[(x - a), $MachinePrecision], If[LessEqual[z, 6.2e+42], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+53}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+42}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\end{array}
\end{array}
if z < -9.20000000000000079e53Initial program 94.5%
Taylor expanded in z around inf
lower--.f6481.8
Applied rewrites81.8%
if -9.20000000000000079e53 < z < 6.2000000000000003e42Initial program 98.5%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6488.6
Applied rewrites88.6%
if 6.2000000000000003e42 < z Initial program 95.2%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.3
Applied rewrites90.3%
Taylor expanded in t around 0
Applied rewrites77.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2500.0) (not (<= z 0.0215))) (- x a) (- x (* (- y z) (fma a z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2500.0) || !(z <= 0.0215)) {
tmp = x - a;
} else {
tmp = x - ((y - z) * fma(a, z, a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2500.0) || !(z <= 0.0215)) tmp = Float64(x - a); else tmp = Float64(x - Float64(Float64(y - z) * fma(a, z, a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2500.0], N[Not[LessEqual[z, 0.0215]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a * z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2500 \lor \neg \left(z \leq 0.0215\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \mathsf{fma}\left(a, z, a\right)\\
\end{array}
\end{array}
if z < -2500 or 0.021499999999999998 < z Initial program 95.5%
Taylor expanded in z around inf
lower--.f6475.4
Applied rewrites75.4%
if -2500 < z < 0.021499999999999998Initial program 98.4%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.9
Applied rewrites67.9%
Taylor expanded in z around 0
Applied rewrites67.9%
Final simplification71.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.8e+50) (not (<= z 0.06))) (- x a) (- x (* a y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.8e+50) || !(z <= 0.06)) {
tmp = x - a;
} else {
tmp = x - (a * y);
}
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 <= (-6.8d+50)) .or. (.not. (z <= 0.06d0))) then
tmp = x - a
else
tmp = x - (a * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.8e+50) || !(z <= 0.06)) {
tmp = x - a;
} else {
tmp = x - (a * y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.8e+50) or not (z <= 0.06): tmp = x - a else: tmp = x - (a * y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.8e+50) || !(z <= 0.06)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.8e+50) || ~((z <= 0.06))) tmp = x - a; else tmp = x - (a * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.8e+50], N[Not[LessEqual[z, 0.06]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+50} \lor \neg \left(z \leq 0.06\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot y\\
\end{array}
\end{array}
if z < -6.7999999999999997e50 or 0.059999999999999998 < z Initial program 95.1%
Taylor expanded in z around inf
lower--.f6477.2
Applied rewrites77.2%
if -6.7999999999999997e50 < z < 0.059999999999999998Initial program 98.5%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6469.1
Applied rewrites69.1%
Taylor expanded in z around 0
Applied rewrites66.2%
Final simplification71.2%
(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 96.9%
Taylor expanded in z around inf
lower--.f6457.7
Applied rewrites57.7%
(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 96.9%
Taylor expanded in z around inf
lower--.f6457.7
Applied rewrites57.7%
Taylor expanded in x around 0
Applied rewrites18.3%
(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 2024337
(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))))