
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 -5e-296)
(fma (/ (- z t) (- a t)) (- y x) x)
(if (<= t_1 0.0)
(fma (- x y) (/ (- z a) t) y)
(+ x (/ (- y x) (/ (- a t) (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -5e-296) {
tmp = fma(((z - t) / (a - t)), (y - x), x);
} else if (t_1 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = x + ((y - x) / ((a - t) / (z - t)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -5e-296) tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); elseif (t_1 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-296], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-296}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-296Initial program 76.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.9
Applied rewrites91.9%
if -5.0000000000000003e-296 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 3.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.7%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6487.9
Applied rewrites87.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z t) (- a t)) (- y x) x))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-296)
t_1
(if (<= t_2 0.0) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - t) / (a - t)), (y - x), x);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-296) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-296) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-296], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-296 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6490.1
Applied rewrites90.1%
if -5.0000000000000003e-296 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 3.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.2e+24)
(fma (/ z a) (- y x) x)
(if (<= a 2.6e-201)
(/ (* y (- z t)) (- a t))
(if (<= a 0.34) (* (- y x) (/ z (- a t))) (fma (- z t) (/ y a) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e+24) {
tmp = fma((z / a), (y - x), x);
} else if (a <= 2.6e-201) {
tmp = (y * (z - t)) / (a - t);
} else if (a <= 0.34) {
tmp = (y - x) * (z / (a - t));
} else {
tmp = fma((z - t), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e+24) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (a <= 2.6e-201) tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t)); elseif (a <= 0.34) tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t))); else tmp = fma(Float64(z - t), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e+24], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.6e-201], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.34], N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-201}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;a \leq 0.34:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -3.1999999999999997e24Initial program 71.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
Taylor expanded in t around 0
lower-/.f6471.5
Applied rewrites71.5%
if -3.1999999999999997e24 < a < 2.59999999999999982e-201Initial program 64.6%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6460.6
Applied rewrites60.6%
if 2.59999999999999982e-201 < a < 0.340000000000000024Initial program 55.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6469.9
Applied rewrites69.9%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6458.9
Applied rewrites58.9%
Applied rewrites66.6%
if 0.340000000000000024 < a Initial program 71.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--.f6473.4
Applied rewrites73.4%
Taylor expanded in y around inf
Applied rewrites67.7%
Final simplification65.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.2e+24)
(fma (/ z a) (- y x) x)
(if (<= a 9e-205)
(/ (* y (- z t)) (- a t))
(if (<= a 0.34) (* z (/ (- y x) (- a t))) (fma (- z t) (/ y a) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e+24) {
tmp = fma((z / a), (y - x), x);
} else if (a <= 9e-205) {
tmp = (y * (z - t)) / (a - t);
} else if (a <= 0.34) {
tmp = z * ((y - x) / (a - t));
} else {
tmp = fma((z - t), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e+24) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (a <= 9e-205) tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t)); elseif (a <= 0.34) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); else tmp = fma(Float64(z - t), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e+24], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 9e-205], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.34], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-205}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;a \leq 0.34:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -3.1999999999999997e24Initial program 71.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
Taylor expanded in t around 0
lower-/.f6471.5
Applied rewrites71.5%
if -3.1999999999999997e24 < a < 8.99999999999999912e-205Initial program 64.2%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6460.2
Applied rewrites60.2%
if 8.99999999999999912e-205 < a < 0.340000000000000024Initial program 57.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6470.7
Applied rewrites70.7%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6460.1
Applied rewrites60.1%
Applied rewrites64.9%
if 0.340000000000000024 < a Initial program 71.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--.f6473.4
Applied rewrites73.4%
Taylor expanded in y around inf
Applied rewrites67.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.2e+24)
(fma (/ z a) (- y x) x)
(if (<= a 1.05e-203)
(/ (* y (- z t)) (- a t))
(if (<= a 0.29) (/ (* (- y x) z) (- a t)) (fma (- z t) (/ y a) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e+24) {
tmp = fma((z / a), (y - x), x);
} else if (a <= 1.05e-203) {
tmp = (y * (z - t)) / (a - t);
} else if (a <= 0.29) {
tmp = ((y - x) * z) / (a - t);
} else {
tmp = fma((z - t), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e+24) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (a <= 1.05e-203) tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t)); elseif (a <= 0.29) tmp = Float64(Float64(Float64(y - x) * z) / Float64(a - t)); else tmp = fma(Float64(z - t), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e+24], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.05e-203], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.29], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-203}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;a \leq 0.29:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -3.1999999999999997e24Initial program 71.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
Taylor expanded in t around 0
lower-/.f6471.5
Applied rewrites71.5%
if -3.1999999999999997e24 < a < 1.05000000000000001e-203Initial program 64.2%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6460.2
Applied rewrites60.2%
if 1.05000000000000001e-203 < a < 0.28999999999999998Initial program 57.1%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6460.1
Applied rewrites60.1%
if 0.28999999999999998 < a Initial program 71.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--.f6473.4
Applied rewrites73.4%
Taylor expanded in y around inf
Applied rewrites67.7%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- a t))))
(if (<= t -2.6e+24)
t_1
(if (<= t 1.85e-83)
(fma (/ z a) (- y x) x)
(if (<= t 7.6e+143) t_1 (+ x (- y x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (a - t);
double tmp;
if (t <= -2.6e+24) {
tmp = t_1;
} else if (t <= 1.85e-83) {
tmp = fma((z / a), (y - x), x);
} else if (t <= 7.6e+143) {
tmp = t_1;
} else {
tmp = x + (y - x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(a - t)) tmp = 0.0 if (t <= -2.6e+24) tmp = t_1; elseif (t <= 1.85e-83) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (t <= 7.6e+143) tmp = t_1; else tmp = Float64(x + Float64(y - x)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e+24], t$95$1, If[LessEqual[t, 1.85e-83], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 7.6e+143], t$95$1, N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-83}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right)\\
\end{array}
\end{array}
if t < -2.5999999999999998e24 or 1.84999999999999997e-83 < t < 7.60000000000000001e143Initial program 53.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6453.9
Applied rewrites53.9%
if -2.5999999999999998e24 < t < 1.84999999999999997e-83Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6495.9
Applied rewrites95.9%
Taylor expanded in t around 0
lower-/.f6476.5
Applied rewrites76.5%
if 7.60000000000000001e143 < t Initial program 19.1%
Taylor expanded in t around inf
lower--.f6445.9
Applied rewrites45.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- y x))))
(if (<= t -1.9e+91)
t_1
(if (<= t 2.35e-102)
(fma (/ z a) (- y x) x)
(if (<= t 3.9e+126) (/ (* (- y x) z) (- t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -1.9e+91) {
tmp = t_1;
} else if (t <= 2.35e-102) {
tmp = fma((z / a), (y - x), x);
} else if (t <= 3.9e+126) {
tmp = ((y - x) * z) / -t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -1.9e+91) tmp = t_1; elseif (t <= 2.35e-102) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (t <= 3.9e+126) tmp = Float64(Float64(Float64(y - x) * z) / Float64(-t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+91], t$95$1, If[LessEqual[t, 2.35e-102], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 3.9e+126], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / (-t)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-102}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+126}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{-t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8999999999999999e91 or 3.89999999999999993e126 < t Initial program 32.3%
Taylor expanded in t around inf
lower--.f6446.1
Applied rewrites46.1%
if -1.8999999999999999e91 < t < 2.3500000000000001e-102Initial program 88.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.6
Applied rewrites91.6%
Taylor expanded in t around 0
lower-/.f6473.5
Applied rewrites73.5%
if 2.3500000000000001e-102 < t < 3.89999999999999993e126Initial program 72.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6479.9
Applied rewrites79.9%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6458.1
Applied rewrites58.1%
Taylor expanded in a around 0
Applied rewrites49.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- y x))))
(if (<= t -8.1e+90)
t_1
(if (<= t 1.95e-49)
(fma z (/ y a) x)
(if (<= t 4e+126) (* z (/ y (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -8.1e+90) {
tmp = t_1;
} else if (t <= 1.95e-49) {
tmp = fma(z, (y / a), x);
} else if (t <= 4e+126) {
tmp = z * (y / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -8.1e+90) tmp = t_1; elseif (t <= 1.95e-49) tmp = fma(z, Float64(y / a), x); elseif (t <= 4e+126) tmp = Float64(z * Float64(y / Float64(a - t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.1e+90], t$95$1, If[LessEqual[t, 1.95e-49], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 4e+126], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -8.1 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-49}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+126}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.1e90 or 3.9999999999999997e126 < t Initial program 32.3%
Taylor expanded in t around inf
lower--.f6446.1
Applied rewrites46.1%
if -8.1e90 < t < 1.95000000000000006e-49Initial program 88.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6468.8
Applied rewrites68.8%
Taylor expanded in y around inf
Applied rewrites55.9%
if 1.95000000000000006e-49 < t < 3.9999999999999997e126Initial program 64.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6475.2
Applied rewrites75.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6457.4
Applied rewrites57.4%
Taylor expanded in y around inf
Applied rewrites41.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- y x))))
(if (<= t -8.1e+90)
t_1
(if (<= t 1.95e-49)
(fma z (/ y a) x)
(if (<= t 1.15e+127) (* y (/ z (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -8.1e+90) {
tmp = t_1;
} else if (t <= 1.95e-49) {
tmp = fma(z, (y / a), x);
} else if (t <= 1.15e+127) {
tmp = y * (z / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -8.1e+90) tmp = t_1; elseif (t <= 1.95e-49) tmp = fma(z, Float64(y / a), x); elseif (t <= 1.15e+127) tmp = Float64(y * Float64(z / Float64(a - t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.1e+90], t$95$1, If[LessEqual[t, 1.95e-49], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.15e+127], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -8.1 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-49}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+127}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.1e90 or 1.1500000000000001e127 < t Initial program 32.3%
Taylor expanded in t around inf
lower--.f6446.1
Applied rewrites46.1%
if -8.1e90 < t < 1.95000000000000006e-49Initial program 88.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6468.8
Applied rewrites68.8%
Taylor expanded in y around inf
Applied rewrites55.9%
if 1.95000000000000006e-49 < t < 1.1500000000000001e127Initial program 64.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6475.2
Applied rewrites75.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6457.4
Applied rewrites57.4%
Applied rewrites63.7%
Taylor expanded in y around inf
Applied rewrites41.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -2.6e+24)
t_1
(if (<= t 8e+47) (fma (/ z (- a t)) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -2.6e+24) {
tmp = t_1;
} else if (t <= 8e+47) {
tmp = fma((z / (a - t)), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.6e+24) tmp = t_1; elseif (t <= 8e+47) tmp = fma(Float64(z / Float64(a - t)), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.6e+24], t$95$1, If[LessEqual[t, 8e+47], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.5999999999999998e24 or 8.0000000000000004e47 < t Initial program 37.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites82.4%
if -2.5999999999999998e24 < t < 8.0000000000000004e47Initial program 90.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6494.3
Applied rewrites94.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6483.7
Applied rewrites83.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ (- y x) a) x)))
(if (<= a -3.5e+19)
t_1
(if (<= a 7.8e+19) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), ((y - x) / a), x);
double tmp;
if (a <= -3.5e+19) {
tmp = t_1;
} else if (a <= 7.8e+19) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(Float64(y - x) / a), x) tmp = 0.0 if (a <= -3.5e+19) tmp = t_1; elseif (a <= 7.8e+19) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.5e+19], t$95$1, If[LessEqual[a, 7.8e+19], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.5e19 or 7.8e19 < a Initial program 73.2%
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.7
Applied rewrites75.7%
if -3.5e19 < a < 7.8e19Initial program 61.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites82.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ (- z a) t) y))) (if (<= t -4.8e-35) t_1 (if (<= t 2.35e-102) (fma (/ z a) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -4.8e-35) {
tmp = t_1;
} else if (t <= 2.35e-102) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -4.8e-35) tmp = t_1; elseif (t <= 2.35e-102) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -4.8e-35], t$95$1, If[LessEqual[t, 2.35e-102], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-102}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.8000000000000003e-35 or 2.3500000000000001e-102 < t Initial program 48.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites77.2%
if -4.8000000000000003e-35 < t < 2.3500000000000001e-102Initial program 93.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6496.2
Applied rewrites96.2%
Taylor expanded in t around 0
lower-/.f6480.4
Applied rewrites80.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y x) (/ z (- a t)))))
(if (<= z -4e+19)
t_1
(if (<= z 1.85e+22) (fma (- x y) (/ t (- a t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - x) * (z / (a - t));
double tmp;
if (z <= -4e+19) {
tmp = t_1;
} else if (z <= 1.85e+22) {
tmp = fma((x - y), (t / (a - t)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - x) * Float64(z / Float64(a - t))) tmp = 0.0 if (z <= -4e+19) tmp = t_1; elseif (z <= 1.85e+22) tmp = fma(Float64(x - y), Float64(t / Float64(a - t)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+19], t$95$1, If[LessEqual[z, 1.85e+22], N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4e19 or 1.8499999999999999e22 < z Initial program 71.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6460.2
Applied rewrites60.2%
Applied rewrites74.3%
if -4e19 < z < 1.8499999999999999e22Initial program 63.3%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.5
Applied rewrites64.5%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- y x)))) (if (<= t -1.9e+91) t_1 (if (<= t 1.3e+127) (fma (/ z a) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -1.9e+91) {
tmp = t_1;
} else if (t <= 1.3e+127) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -1.9e+91) tmp = t_1; elseif (t <= 1.3e+127) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+91], t$95$1, If[LessEqual[t, 1.3e+127], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+127}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8999999999999999e91 or 1.3000000000000001e127 < t Initial program 32.3%
Taylor expanded in t around inf
lower--.f6446.1
Applied rewrites46.1%
if -1.8999999999999999e91 < t < 1.3000000000000001e127Initial program 84.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6488.7
Applied rewrites88.7%
Taylor expanded in t around 0
lower-/.f6464.1
Applied rewrites64.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- y x)))) (if (<= t -1.9e+91) t_1 (if (<= t 1.3e+127) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -1.9e+91) {
tmp = t_1;
} else if (t <= 1.3e+127) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -1.9e+91) tmp = t_1; elseif (t <= 1.3e+127) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+91], t$95$1, If[LessEqual[t, 1.3e+127], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+127}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8999999999999999e91 or 1.3000000000000001e127 < t Initial program 32.3%
Taylor expanded in t around inf
lower--.f6446.1
Applied rewrites46.1%
if -1.8999999999999999e91 < t < 1.3000000000000001e127Initial program 84.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6461.8
Applied rewrites61.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- y x)))) (if (<= t -8.1e+90) t_1 (if (<= t 9e+114) (fma z (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -8.1e+90) {
tmp = t_1;
} else if (t <= 9e+114) {
tmp = fma(z, (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -8.1e+90) tmp = t_1; elseif (t <= 9e+114) tmp = fma(z, Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.1e+90], t$95$1, If[LessEqual[t, 9e+114], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -8.1 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+114}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.1e90 or 9.0000000000000001e114 < t Initial program 32.7%
Taylor expanded in t around inf
lower--.f6445.2
Applied rewrites45.2%
if -8.1e90 < t < 9.0000000000000001e114Initial program 84.5%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6462.4
Applied rewrites62.4%
Taylor expanded in y around inf
Applied rewrites51.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- y x)))) (if (<= t -2.7e+60) t_1 (if (<= t 3.8e+46) (* y (/ z a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -2.7e+60) {
tmp = t_1;
} else if (t <= 3.8e+46) {
tmp = y * (z / 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 = x + (y - x)
if (t <= (-2.7d+60)) then
tmp = t_1
else if (t <= 3.8d+46) then
tmp = y * (z / 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 = x + (y - x);
double tmp;
if (t <= -2.7e+60) {
tmp = t_1;
} else if (t <= 3.8e+46) {
tmp = y * (z / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - x) tmp = 0 if t <= -2.7e+60: tmp = t_1 elif t <= 3.8e+46: tmp = y * (z / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -2.7e+60) tmp = t_1; elseif (t <= 3.8e+46) tmp = Float64(y * Float64(z / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - x); tmp = 0.0; if (t <= -2.7e+60) tmp = t_1; elseif (t <= 3.8e+46) tmp = y * (z / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+60], t$95$1, If[LessEqual[t, 3.8e+46], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+46}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.6999999999999999e60 or 3.7999999999999999e46 < t Initial program 37.2%
Taylor expanded in t around inf
lower--.f6440.6
Applied rewrites40.6%
if -2.6999999999999999e60 < t < 3.7999999999999999e46Initial program 87.2%
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--.f6469.3
Applied rewrites69.3%
Taylor expanded in y around inf
Applied rewrites28.9%
Taylor expanded in z around inf
Applied rewrites24.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- y x)))) (if (<= t -1.55e-41) t_1 (if (<= t 2.8e+40) (/ (* y z) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -1.55e-41) {
tmp = t_1;
} else if (t <= 2.8e+40) {
tmp = (y * z) / 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 = x + (y - x)
if (t <= (-1.55d-41)) then
tmp = t_1
else if (t <= 2.8d+40) then
tmp = (y * z) / 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 = x + (y - x);
double tmp;
if (t <= -1.55e-41) {
tmp = t_1;
} else if (t <= 2.8e+40) {
tmp = (y * z) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - x) tmp = 0 if t <= -1.55e-41: tmp = t_1 elif t <= 2.8e+40: tmp = (y * z) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -1.55e-41) tmp = t_1; elseif (t <= 2.8e+40) tmp = Float64(Float64(y * z) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - x); tmp = 0.0; if (t <= -1.55e-41) tmp = t_1; elseif (t <= 2.8e+40) tmp = (y * z) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e-41], t$95$1, If[LessEqual[t, 2.8e+40], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+40}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.55e-41 or 2.8000000000000001e40 < t Initial program 41.4%
Taylor expanded in t around inf
lower--.f6436.0
Applied rewrites36.0%
if -1.55e-41 < t < 2.8000000000000001e40Initial program 92.3%
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--.f6474.0
Applied rewrites74.0%
Taylor expanded in y around inf
Applied rewrites29.9%
Taylor expanded in z around inf
Applied rewrites25.0%
(FPCore (x y z t a) :precision binary64 (+ x (- y x)))
double code(double x, double y, double z, double t, double a) {
return x + (y - x);
}
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 - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y - x);
}
def code(x, y, z, t, a): return x + (y - x)
function code(x, y, z, t, a) return Float64(x + Float64(y - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (y - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right)
\end{array}
Initial program 66.7%
Taylor expanded in t around inf
lower--.f6421.8
Applied rewrites21.8%
(FPCore (x y z t a) :precision binary64 (+ x (- x)))
double code(double x, double y, double z, double t, double a) {
return x + -x;
}
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 + -x
end function
public static double code(double x, double y, double z, double t, double a) {
return x + -x;
}
def code(x, y, z, t, a): return x + -x
function code(x, y, z, t, a) return Float64(x + Float64(-x)) end
function tmp = code(x, y, z, t, a) tmp = x + -x; end
code[x_, y_, z_, t_, a_] := N[(x + (-x)), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-x\right)
\end{array}
Initial program 66.7%
Taylor expanded in t around inf
lower--.f6421.8
Applied rewrites21.8%
Taylor expanded in y around 0
Applied rewrites2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024238
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))