
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - 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) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - 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) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) (- a z)) (- t x) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -5e-280)
t_1
(if (<= t_2 0.0) (fma (- a y) (/ (- t x) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / (a - z)), (t - x), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -5e-280) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((a - y), ((t - x) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -5e-280) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(a - y), Float64(Float64(t - x) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-280], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(a - y), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-280}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(a - y, \frac{t - x}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.00000000000000028e-280 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 88.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6492.5
Applied rewrites92.5%
if -5.00000000000000028e-280 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f643.9
Applied rewrites3.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
associate-*r/N/A
sub-negN/A
distribute-lft-inN/A
associate-*r*N/A
neg-mul-1N/A
remove-double-negN/A
distribute-rgt-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
Applied rewrites99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y z) (/ t (- a z)))) (t_2 (fma (/ y a) (- t x) x)))
(if (<= a -3.1e+24)
t_2
(if (<= a -4.3e-32)
t_1
(if (<= a 7.5e-133)
(+ t (/ (* y (- x t)) z))
(if (<= a 1.16e-89)
(/ (* y (- t x)) (- a z))
(if (<= a 7.7e+64) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) * (t / (a - z));
double t_2 = fma((y / a), (t - x), x);
double tmp;
if (a <= -3.1e+24) {
tmp = t_2;
} else if (a <= -4.3e-32) {
tmp = t_1;
} else if (a <= 7.5e-133) {
tmp = t + ((y * (x - t)) / z);
} else if (a <= 1.16e-89) {
tmp = (y * (t - x)) / (a - z);
} else if (a <= 7.7e+64) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z))) t_2 = fma(Float64(y / a), Float64(t - x), x) tmp = 0.0 if (a <= -3.1e+24) tmp = t_2; elseif (a <= -4.3e-32) tmp = t_1; elseif (a <= 7.5e-133) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); elseif (a <= 1.16e-89) tmp = Float64(Float64(y * Float64(t - x)) / Float64(a - z)); elseif (a <= 7.7e+64) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.1e+24], t$95$2, If[LessEqual[a, -4.3e-32], t$95$1, If[LessEqual[a, 7.5e-133], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.16e-89], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.7e+64], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
t_2 := \mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4.3 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-133}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-89}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\
\mathbf{elif}\;a \leq 7.7 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -3.10000000000000011e24 or 7.6999999999999999e64 < a Initial program 83.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6486.7
Applied rewrites86.7%
Taylor expanded in z around 0
lower-/.f6469.1
Applied rewrites69.1%
if -3.10000000000000011e24 < a < -4.2999999999999999e-32 or 1.15999999999999993e-89 < a < 7.6999999999999999e64Initial program 80.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6478.6
Applied rewrites78.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6441.8
Applied rewrites41.8%
Applied rewrites62.7%
if -4.2999999999999999e-32 < a < 7.4999999999999999e-133Initial program 67.2%
Taylor expanded in z around inf
associate--l+N/A
+-commutativeN/A
Applied rewrites76.4%
Taylor expanded in a around 0
Applied rewrites77.8%
if 7.4999999999999999e-133 < a < 1.15999999999999993e-89Initial program 70.9%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6490.0
Applied rewrites90.0%
Final simplification71.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -1.45e+22)
t_2
(if (<= a -4.4e-167)
t_1
(if (<= a 1.15e-200)
(+ t (/ (* y (- x t)) z))
(if (<= a 7.7e+64) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -1.45e+22) {
tmp = t_2;
} else if (a <= -4.4e-167) {
tmp = t_1;
} else if (a <= 1.15e-200) {
tmp = t + ((y * (x - t)) / z);
} else if (a <= 7.7e+64) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -1.45e+22) tmp = t_2; elseif (a <= -4.4e-167) tmp = t_1; elseif (a <= 1.15e-200) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); elseif (a <= 7.7e+64) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.45e+22], t$95$2, If[LessEqual[a, -4.4e-167], t$95$1, If[LessEqual[a, 1.15e-200], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.7e+64], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-200}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 7.7 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.45e22 or 7.6999999999999999e64 < a Initial program 83.6%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.1
Applied rewrites75.1%
if -1.45e22 < a < -4.3999999999999999e-167 or 1.15000000000000004e-200 < a < 7.6999999999999999e64Initial program 74.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6478.5
Applied rewrites78.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Applied rewrites68.0%
if -4.3999999999999999e-167 < a < 1.15000000000000004e-200Initial program 65.2%
Taylor expanded in z around inf
associate--l+N/A
+-commutativeN/A
Applied rewrites84.7%
Taylor expanded in a around 0
Applied rewrites82.0%
Final simplification74.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (fma (/ y a) (- t x) x)))
(if (<= a -3.1e+24)
t_2
(if (<= a -4.4e-167)
t_1
(if (<= a 1.15e-200)
(+ t (/ (* y (- x t)) z))
(if (<= a 7.7e+64) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = fma((y / a), (t - x), x);
double tmp;
if (a <= -3.1e+24) {
tmp = t_2;
} else if (a <= -4.4e-167) {
tmp = t_1;
} else if (a <= 1.15e-200) {
tmp = t + ((y * (x - t)) / z);
} else if (a <= 7.7e+64) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = fma(Float64(y / a), Float64(t - x), x) tmp = 0.0 if (a <= -3.1e+24) tmp = t_2; elseif (a <= -4.4e-167) tmp = t_1; elseif (a <= 1.15e-200) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); elseif (a <= 7.7e+64) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.1e+24], t$95$2, If[LessEqual[a, -4.4e-167], t$95$1, If[LessEqual[a, 1.15e-200], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.7e+64], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := \mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-200}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 7.7 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -3.10000000000000011e24 or 7.6999999999999999e64 < a Initial program 83.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6486.7
Applied rewrites86.7%
Taylor expanded in z around 0
lower-/.f6469.1
Applied rewrites69.1%
if -3.10000000000000011e24 < a < -4.3999999999999999e-167 or 1.15000000000000004e-200 < a < 7.6999999999999999e64Initial program 74.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6478.5
Applied rewrites78.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Applied rewrites68.0%
if -4.3999999999999999e-167 < a < 1.15000000000000004e-200Initial program 65.2%
Taylor expanded in z around inf
associate--l+N/A
+-commutativeN/A
Applied rewrites84.7%
Taylor expanded in a around 0
Applied rewrites82.0%
Final simplification71.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- a y) (/ (- t x) z) t)))
(if (<= z -2.8e+71)
t_1
(if (<= z 5.7e+110) (fma (/ y (- a z)) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((a - y), ((t - x) / z), t);
double tmp;
if (z <= -2.8e+71) {
tmp = t_1;
} else if (z <= 5.7e+110) {
tmp = fma((y / (a - z)), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(a - y), Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -2.8e+71) tmp = t_1; elseif (z <= 5.7e+110) tmp = fma(Float64(y / Float64(a - z)), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a - y), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.8e+71], t$95$1, If[LessEqual[z, 5.7e+110], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a - y, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.80000000000000002e71 or 5.7000000000000002e110 < z Initial program 54.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6458.3
Applied rewrites58.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
associate-*r/N/A
sub-negN/A
distribute-lft-inN/A
associate-*r*N/A
neg-mul-1N/A
remove-double-negN/A
distribute-rgt-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
Applied rewrites79.5%
if -2.80000000000000002e71 < z < 5.7000000000000002e110Initial program 90.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6482.3
Applied rewrites82.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- a y) (/ (- t x) z) t)))
(if (<= z -3.5e+71)
t_1
(if (<= z 1.95) (fma (- y z) (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((a - y), ((t - x) / z), t);
double tmp;
if (z <= -3.5e+71) {
tmp = t_1;
} else if (z <= 1.95) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(a - y), Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -3.5e+71) tmp = t_1; elseif (z <= 1.95) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a - y), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -3.5e+71], t$95$1, If[LessEqual[z, 1.95], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a - y, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.95:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4999999999999999e71 or 1.94999999999999996 < z Initial program 58.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6462.8
Applied rewrites62.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
associate-*r/N/A
sub-negN/A
distribute-lft-inN/A
associate-*r*N/A
neg-mul-1N/A
remove-double-negN/A
distribute-rgt-inN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
Applied rewrites77.4%
if -3.4999999999999999e71 < z < 1.94999999999999996Initial program 91.7%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6477.7
Applied rewrites77.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -9.5e+19) (fma (/ y a) (- t x) x) (if (<= a 3.4e-9) (+ t (/ (* y (- x t)) z)) (fma y (/ (- t x) a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e+19) {
tmp = fma((y / a), (t - x), x);
} else if (a <= 3.4e-9) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = fma(y, ((t - x) / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e+19) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (a <= 3.4e-9) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); else tmp = fma(y, Float64(Float64(t - x) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e+19], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 3.4e-9], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-9}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\end{array}
\end{array}
if a < -9.5e19Initial program 84.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6490.4
Applied rewrites90.4%
Taylor expanded in z around 0
lower-/.f6468.6
Applied rewrites68.6%
if -9.5e19 < a < 3.3999999999999998e-9Initial program 70.1%
Taylor expanded in z around inf
associate--l+N/A
+-commutativeN/A
Applied rewrites73.2%
Taylor expanded in a around 0
Applied rewrites66.1%
if 3.3999999999999998e-9 < a Initial program 81.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.1
Applied rewrites66.1%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+78) (fma (/ y z) (- t) t) (if (<= z 5.7e+110) (fma (/ y a) (- t x) x) (* t (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+78) {
tmp = fma((y / z), -t, t);
} else if (z <= 5.7e+110) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t * (z / (z - a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+78) tmp = fma(Float64(y / z), Float64(-t), t); elseif (z <= 5.7e+110) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = Float64(t * Float64(z / Float64(z - a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+78], N[(N[(y / z), $MachinePrecision] * (-t) + t), $MachinePrecision], If[LessEqual[z, 5.7e+110], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -t, t\right)\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.1500000000000001e78Initial program 59.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6465.0
Applied rewrites65.0%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6435.6
Applied rewrites35.6%
Taylor expanded in a around 0
Applied rewrites56.3%
Applied rewrites56.3%
if -1.1500000000000001e78 < z < 5.7000000000000002e110Initial program 90.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.7
Applied rewrites93.7%
Taylor expanded in z around 0
lower-/.f6469.3
Applied rewrites69.3%
if 5.7000000000000002e110 < z Initial program 48.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6450.9
Applied rewrites50.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6430.6
Applied rewrites30.6%
Taylor expanded in y around 0
Applied rewrites53.0%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ y z) (- t) t))) (if (<= z -1.15e+78) t_1 (if (<= z 5.7e+110) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / z), -t, t);
double tmp;
if (z <= -1.15e+78) {
tmp = t_1;
} else if (z <= 5.7e+110) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / z), Float64(-t), t) tmp = 0.0 if (z <= -1.15e+78) tmp = t_1; elseif (z <= 5.7e+110) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * (-t) + t), $MachinePrecision]}, If[LessEqual[z, -1.15e+78], t$95$1, If[LessEqual[z, 5.7e+110], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, -t, t\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1500000000000001e78 or 5.7000000000000002e110 < z Initial program 54.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6458.4
Applied rewrites58.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6433.3
Applied rewrites33.3%
Taylor expanded in a around 0
Applied rewrites53.3%
Applied rewrites53.3%
if -1.1500000000000001e78 < z < 5.7000000000000002e110Initial program 90.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.7
Applied rewrites93.7%
Taylor expanded in z around 0
lower-/.f6469.3
Applied rewrites69.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ y z) (- t) t))) (if (<= z -1.15e+78) t_1 (if (<= z 2.2e+104) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / z), -t, t);
double tmp;
if (z <= -1.15e+78) {
tmp = t_1;
} else if (z <= 2.2e+104) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / z), Float64(-t), t) tmp = 0.0 if (z <= -1.15e+78) tmp = t_1; elseif (z <= 2.2e+104) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * (-t) + t), $MachinePrecision]}, If[LessEqual[z, -1.15e+78], t$95$1, If[LessEqual[z, 2.2e+104], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, -t, t\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1500000000000001e78 or 2.2e104 < z Initial program 54.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6458.9
Applied rewrites58.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6434.0
Applied rewrites34.0%
Taylor expanded in a around 0
Applied rewrites52.8%
Applied rewrites52.8%
if -1.1500000000000001e78 < z < 2.2e104Initial program 90.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6468.0
Applied rewrites68.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (/ (* y t) a)))) (if (<= a -1.3e+20) t_1 (if (<= a 3.8e-10) (fma (/ y z) (- t) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * t) / a);
double tmp;
if (a <= -1.3e+20) {
tmp = t_1;
} else if (a <= 3.8e-10) {
tmp = fma((y / z), -t, t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * t) / a)) tmp = 0.0 if (a <= -1.3e+20) tmp = t_1; elseif (a <= 3.8e-10) tmp = fma(Float64(y / z), Float64(-t), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.3e+20], t$95$1, If[LessEqual[a, 3.8e-10], N[(N[(y / z), $MachinePrecision] * (-t) + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;a \leq -1.3 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -t, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.3e20 or 3.7999999999999998e-10 < a Initial program 83.3%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6456.7
Applied rewrites56.7%
Taylor expanded in t around inf
Applied rewrites53.9%
if -1.3e20 < a < 3.7999999999999998e-10Initial program 70.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6475.2
Applied rewrites75.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.0
Applied rewrites48.0%
Taylor expanded in a around 0
Applied rewrites54.9%
Applied rewrites54.9%
Final simplification54.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ y z) (- t) t))) (if (<= z -9e-30) t_1 (if (<= z 3e-131) (* t (/ y (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / z), -t, t);
double tmp;
if (z <= -9e-30) {
tmp = t_1;
} else if (z <= 3e-131) {
tmp = t * (y / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / z), Float64(-t), t) tmp = 0.0 if (z <= -9e-30) tmp = t_1; elseif (z <= 3e-131) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * (-t) + t), $MachinePrecision]}, If[LessEqual[z, -9e-30], t$95$1, If[LessEqual[z, 3e-131], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, -t, t\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-131}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.99999999999999935e-30 or 2.99999999999999996e-131 < z Initial program 69.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.1
Applied rewrites72.1%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6435.7
Applied rewrites35.7%
Taylor expanded in a around 0
Applied rewrites42.8%
Applied rewrites42.8%
if -8.99999999999999935e-30 < z < 2.99999999999999996e-131Initial program 89.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6433.9
Applied rewrites33.9%
Taylor expanded in y around inf
Applied rewrites35.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (- t)))) (if (<= z -5e+79) t_1 (if (<= z 860.0) (* t (/ y (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(-t);
double tmp;
if (z <= -5e+79) {
tmp = t_1;
} else if (z <= 860.0) {
tmp = t * (y / (a - z));
} else {
tmp = t_1;
}
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 = -(-t)
if (z <= (-5d+79)) then
tmp = t_1
else if (z <= 860.0d0) then
tmp = t * (y / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(-t);
double tmp;
if (z <= -5e+79) {
tmp = t_1;
} else if (z <= 860.0) {
tmp = t * (y / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(-t) tmp = 0 if z <= -5e+79: tmp = t_1 elif z <= 860.0: tmp = t * (y / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(-t)) tmp = 0.0 if (z <= -5e+79) tmp = t_1; elseif (z <= 860.0) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(-t); tmp = 0.0; if (z <= -5e+79) tmp = t_1; elseif (z <= 860.0) tmp = t * (y / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-(-t))}, If[LessEqual[z, -5e+79], t$95$1, If[LessEqual[z, 860.0], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\left(-t\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 860:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5e79 or 860 < z Initial program 58.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6462.9
Applied rewrites62.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6435.6
Applied rewrites35.6%
Taylor expanded in a around 0
Applied rewrites50.4%
Taylor expanded in y around 0
Applied rewrites46.3%
if -5e79 < z < 860Initial program 90.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6434.6
Applied rewrites34.6%
Taylor expanded in y around inf
Applied rewrites29.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (- t)))) (if (<= z -3.1e-29) t_1 (if (<= z 700.0) (* t (/ y a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(-t);
double tmp;
if (z <= -3.1e-29) {
tmp = t_1;
} else if (z <= 700.0) {
tmp = t * (y / a);
} else {
tmp = t_1;
}
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 = -(-t)
if (z <= (-3.1d-29)) then
tmp = t_1
else if (z <= 700.0d0) then
tmp = t * (y / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(-t);
double tmp;
if (z <= -3.1e-29) {
tmp = t_1;
} else if (z <= 700.0) {
tmp = t * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(-t) tmp = 0 if z <= -3.1e-29: tmp = t_1 elif z <= 700.0: tmp = t * (y / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(-t)) tmp = 0.0 if (z <= -3.1e-29) tmp = t_1; elseif (z <= 700.0) tmp = Float64(t * Float64(y / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(-t); tmp = 0.0; if (z <= -3.1e-29) tmp = t_1; elseif (z <= 700.0) tmp = t * (y / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-(-t))}, If[LessEqual[z, -3.1e-29], t$95$1, If[LessEqual[z, 700.0], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\left(-t\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 700:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.10000000000000026e-29 or 700 < z Initial program 64.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6467.0
Applied rewrites67.0%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6434.5
Applied rewrites34.5%
Taylor expanded in a around 0
Applied rewrites46.5%
Taylor expanded in y around 0
Applied rewrites40.7%
if -3.10000000000000026e-29 < z < 700Initial program 90.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6495.1
Applied rewrites95.1%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6435.6
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites21.7%
Applied rewrites25.8%
(FPCore (x y z t a) :precision binary64 (- (- t)))
double code(double x, double y, double z, double t, double a) {
return -(-t);
}
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 = -(-t)
end function
public static double code(double x, double y, double z, double t, double a) {
return -(-t);
}
def code(x, y, z, t, a): return -(-t)
function code(x, y, z, t, a) return Float64(-Float64(-t)) end
function tmp = code(x, y, z, t, a) tmp = -(-t); end
code[x_, y_, z_, t_, a_] := (-(-t))
\begin{array}{l}
\\
-\left(-t\right)
\end{array}
Initial program 77.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6480.7
Applied rewrites80.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6435.0
Applied rewrites35.0%
Taylor expanded in a around 0
Applied rewrites33.3%
Taylor expanded in y around 0
Applied rewrites24.0%
herbie shell --seed 2024220
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))