
(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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y a) z) (- x t) t)))
(if (<= z -2.25e+111)
t_1
(if (<= z 2.6e-8) (+ x (* (- t x) (/ (- y z) (- a z)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - a) / z), (x - t), t);
double tmp;
if (z <= -2.25e+111) {
tmp = t_1;
} else if (z <= 2.6e-8) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - a) / z), Float64(x - t), t) tmp = 0.0 if (z <= -2.25e+111) tmp = t_1; elseif (z <= 2.6e-8) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.25e+111], t$95$1, If[LessEqual[z, 2.6e-8], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.25e111 or 2.6000000000000001e-8 < z Initial program 38.9%
Taylor expanded in z 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 rewrites87.3%
Applied rewrites87.3%
if -2.25e111 < z < 2.6000000000000001e-8Initial program 87.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6493.3
Applied rewrites93.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma t (- (/ y z)) t)))
(if (<= z -500000.0)
t_1
(if (<= z -3e-61)
(/ (* y (- x t)) z)
(if (<= z 2.25e-9)
(+ x (/ (* y t) a))
(if (<= z 4.4e+122) (* (- y a) (/ x z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, -(y / z), t);
double tmp;
if (z <= -500000.0) {
tmp = t_1;
} else if (z <= -3e-61) {
tmp = (y * (x - t)) / z;
} else if (z <= 2.25e-9) {
tmp = x + ((y * t) / a);
} else if (z <= 4.4e+122) {
tmp = (y - a) * (x / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(-Float64(y / z)), t) tmp = 0.0 if (z <= -500000.0) tmp = t_1; elseif (z <= -3e-61) tmp = Float64(Float64(y * Float64(x - t)) / z); elseif (z <= 2.25e-9) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 4.4e+122) tmp = Float64(Float64(y - a) * Float64(x / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision]}, If[LessEqual[z, -500000.0], t$95$1, If[LessEqual[z, -3e-61], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.25e-9], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+122], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-61}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+122}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5e5 or 4.3999999999999998e122 < z Initial program 38.4%
Taylor expanded in z 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 rewrites80.0%
Taylor expanded in x around 0
Applied rewrites55.8%
Taylor expanded in a around 0
Applied rewrites55.8%
if -5e5 < z < -3.00000000000000012e-61Initial program 78.6%
Taylor expanded in z 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 rewrites72.4%
Applied rewrites72.1%
Taylor expanded in y around inf
Applied rewrites74.0%
if -3.00000000000000012e-61 < z < 2.24999999999999988e-9Initial program 92.2%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6478.4
Applied rewrites78.4%
Taylor expanded in t around inf
Applied rewrites70.2%
if 2.24999999999999988e-9 < z < 4.3999999999999998e122Initial program 60.3%
Taylor expanded in z 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 rewrites83.2%
Taylor expanded in z around 0
Applied rewrites59.7%
Taylor expanded in x around inf
Applied rewrites54.1%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y a) z) (- x t) t)))
(if (<= z -2.25e+111)
t_1
(if (<= z 2.6e-8) (fma (- t x) (/ (- y z) (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - a) / z), (x - t), t);
double tmp;
if (z <= -2.25e+111) {
tmp = t_1;
} else if (z <= 2.6e-8) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - a) / z), Float64(x - t), t) tmp = 0.0 if (z <= -2.25e+111) tmp = t_1; elseif (z <= 2.6e-8) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.25e+111], t$95$1, If[LessEqual[z, 2.6e-8], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.25e111 or 2.6000000000000001e-8 < z Initial program 38.9%
Taylor expanded in z 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 rewrites87.3%
Applied rewrites87.3%
if -2.25e111 < z < 2.6000000000000001e-8Initial program 87.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.3
Applied rewrites93.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma t (- (/ y z)) t)))
(if (<= z -500000.0)
t_1
(if (<= z -1.6e-63)
(/ (* y (- x t)) z)
(if (<= z 9.5e-76) (- x (/ (* x y) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, -(y / z), t);
double tmp;
if (z <= -500000.0) {
tmp = t_1;
} else if (z <= -1.6e-63) {
tmp = (y * (x - t)) / z;
} else if (z <= 9.5e-76) {
tmp = x - ((x * y) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(-Float64(y / z)), t) tmp = 0.0 if (z <= -500000.0) tmp = t_1; elseif (z <= -1.6e-63) tmp = Float64(Float64(y * Float64(x - t)) / z); elseif (z <= 9.5e-76) tmp = Float64(x - Float64(Float64(x * y) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision]}, If[LessEqual[z, -500000.0], t$95$1, If[LessEqual[z, -1.6e-63], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 9.5e-76], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-76}:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5e5 or 9.49999999999999984e-76 < z Initial program 45.0%
Taylor expanded in z 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.0%
Taylor expanded in x around 0
Applied rewrites50.7%
Taylor expanded in a around 0
Applied rewrites50.8%
if -5e5 < z < -1.59999999999999994e-63Initial program 78.6%
Taylor expanded in z 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 rewrites72.4%
Applied rewrites72.1%
Taylor expanded in y around inf
Applied rewrites74.0%
if -1.59999999999999994e-63 < z < 9.49999999999999984e-76Initial program 93.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.7
Applied rewrites95.7%
Taylor expanded in t around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.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--.f6461.2
Applied rewrites61.2%
Taylor expanded in z around 0
Applied rewrites55.5%
Final simplification53.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y a) z) (- x t) t)))
(if (<= z -1e-40)
t_1
(if (<= z 1.9e-8) (fma (- t x) (/ (- y z) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - a) / z), (x - t), t);
double tmp;
if (z <= -1e-40) {
tmp = t_1;
} else if (z <= 1.9e-8) {
tmp = fma((t - x), ((y - z) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - a) / z), Float64(x - t), t) tmp = 0.0 if (z <= -1e-40) tmp = t_1; elseif (z <= 1.9e-8) tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1e-40], t$95$1, If[LessEqual[z, 1.9e-8], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.9999999999999993e-41 or 1.90000000000000014e-8 < z Initial program 43.7%
Taylor expanded in z 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 rewrites81.5%
Applied rewrites81.5%
if -9.9999999999999993e-41 < z < 1.90000000000000014e-8Initial program 91.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.4
Applied rewrites95.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6484.3
Applied rewrites84.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y a) z) (- x t) t)))
(if (<= z -1e-40)
t_1
(if (<= z 1.9e-8) (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(((y - a) / z), (x - t), t);
double tmp;
if (z <= -1e-40) {
tmp = t_1;
} else if (z <= 1.9e-8) {
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(Float64(y - a) / z), Float64(x - t), t) tmp = 0.0 if (z <= -1e-40) tmp = t_1; elseif (z <= 1.9e-8) 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[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1e-40], t$95$1, If[LessEqual[z, 1.9e-8], 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(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.9999999999999993e-41 or 1.90000000000000014e-8 < z Initial program 43.7%
Taylor expanded in z 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 rewrites81.5%
Applied rewrites81.5%
if -9.9999999999999993e-41 < z < 1.90000000000000014e-8Initial 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--.f6483.5
Applied rewrites83.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x t) (/ y z) t)))
(if (<= z -1.65e-39)
t_1
(if (<= z 2e-8) (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((x - t), (y / z), t);
double tmp;
if (z <= -1.65e-39) {
tmp = t_1;
} else if (z <= 2e-8) {
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(x - t), Float64(y / z), t) tmp = 0.0 if (z <= -1.65e-39) tmp = t_1; elseif (z <= 2e-8) 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[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.65e-39], t$95$1, If[LessEqual[z, 2e-8], 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(x - t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.64999999999999992e-39 or 2e-8 < z Initial program 43.7%
Taylor expanded in z 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 rewrites81.5%
Taylor expanded in y around inf
Applied rewrites72.6%
if -1.64999999999999992e-39 < z < 2e-8Initial 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--.f6483.5
Applied rewrites83.5%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x t) (/ y z) t))) (if (<= z -1.08e-82) t_1 (if (<= z 6.2e-16) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - t), (y / z), t);
double tmp;
if (z <= -1.08e-82) {
tmp = t_1;
} else if (z <= 6.2e-16) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - t), Float64(y / z), t) tmp = 0.0 if (z <= -1.08e-82) tmp = t_1; elseif (z <= 6.2e-16) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.08e-82], t$95$1, If[LessEqual[z, 6.2e-16], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.07999999999999996e-82 or 6.2000000000000002e-16 < z Initial program 46.0%
Taylor expanded in z 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 rewrites79.2%
Taylor expanded in y around inf
Applied rewrites70.3%
if -1.07999999999999996e-82 < z < 6.2000000000000002e-16Initial program 92.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6496.7
Applied rewrites96.7%
Taylor expanded in z around 0
lower-/.f6483.2
Applied rewrites83.2%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ (- x t) z) t))) (if (<= z -1.08e-82) t_1 (if (<= z 6.2e-16) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, ((x - t) / z), t);
double tmp;
if (z <= -1.08e-82) {
tmp = t_1;
} else if (z <= 6.2e-16) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(x - t) / z), t) tmp = 0.0 if (z <= -1.08e-82) tmp = t_1; elseif (z <= 6.2e-16) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.08e-82], t$95$1, If[LessEqual[z, 6.2e-16], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{x - t}{z}, t\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.07999999999999996e-82 or 6.2000000000000002e-16 < z Initial program 46.0%
Taylor expanded in z 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 rewrites79.2%
Taylor expanded in a around 0
Applied rewrites68.9%
if -1.07999999999999996e-82 < z < 6.2000000000000002e-16Initial program 92.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6496.7
Applied rewrites96.7%
Taylor expanded in z around 0
lower-/.f6483.2
Applied rewrites83.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ (- x t) z) t))) (if (<= z -1.08e-82) t_1 (if (<= z 6.2e-16) (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, ((x - t) / z), t);
double tmp;
if (z <= -1.08e-82) {
tmp = t_1;
} else if (z <= 6.2e-16) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(x - t) / z), t) tmp = 0.0 if (z <= -1.08e-82) tmp = t_1; elseif (z <= 6.2e-16) 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[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.08e-82], t$95$1, If[LessEqual[z, 6.2e-16], 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(y, \frac{x - t}{z}, t\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.07999999999999996e-82 or 6.2000000000000002e-16 < z Initial program 46.0%
Taylor expanded in z 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 rewrites79.2%
Taylor expanded in a around 0
Applied rewrites68.9%
if -1.07999999999999996e-82 < z < 6.2000000000000002e-16Initial program 92.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6483.1
Applied rewrites83.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ (- x t) z) t))) (if (<= z -1.08e-82) t_1 (if (<= z 3.9e-16) (+ x (/ (* y t) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, ((x - t) / z), t);
double tmp;
if (z <= -1.08e-82) {
tmp = t_1;
} else if (z <= 3.9e-16) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(x - t) / z), t) tmp = 0.0 if (z <= -1.08e-82) tmp = t_1; elseif (z <= 3.9e-16) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.08e-82], t$95$1, If[LessEqual[z, 3.9e-16], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{x - t}{z}, t\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-16}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.07999999999999996e-82 or 3.89999999999999977e-16 < z Initial program 46.0%
Taylor expanded in z 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 rewrites79.2%
Taylor expanded in a around 0
Applied rewrites68.9%
if -1.07999999999999996e-82 < z < 3.89999999999999977e-16Initial program 92.7%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6480.0
Applied rewrites80.0%
Taylor expanded in t around inf
Applied rewrites72.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- y a) (/ x z)))) (if (<= x -2.9e+82) t_1 (if (<= x 8.2e+218) (fma t (- (/ y z)) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - a) * (x / z);
double tmp;
if (x <= -2.9e+82) {
tmp = t_1;
} else if (x <= 8.2e+218) {
tmp = fma(t, -(y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - a) * Float64(x / z)) tmp = 0.0 if (x <= -2.9e+82) tmp = t_1; elseif (x <= 8.2e+218) tmp = fma(t, Float64(-Float64(y / z)), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.9e+82], t$95$1, If[LessEqual[x, 8.2e+218], N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+218}:\\
\;\;\;\;\mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.9000000000000001e82 or 8.19999999999999931e218 < x Initial program 48.4%
Taylor expanded in z 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 rewrites55.4%
Taylor expanded in z around 0
Applied rewrites44.9%
Taylor expanded in x around inf
Applied rewrites44.9%
if -2.9000000000000001e82 < x < 8.19999999999999931e218Initial program 74.4%
Taylor expanded in z 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 rewrites51.1%
Taylor expanded in x around 0
Applied rewrites41.1%
Taylor expanded in a around 0
Applied rewrites41.3%
Final simplification42.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -6e-8) (* y (/ (- x t) z)) (if (<= y 1.65e+222) (fma a (/ t z) t) (* (- y a) (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6e-8) {
tmp = y * ((x - t) / z);
} else if (y <= 1.65e+222) {
tmp = fma(a, (t / z), t);
} else {
tmp = (y - a) * (x / z);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6e-8) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (y <= 1.65e+222) tmp = fma(a, Float64(t / z), t); else tmp = Float64(Float64(y - a) * Float64(x / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6e-8], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+222], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+222}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -5.99999999999999946e-8Initial program 68.0%
Taylor expanded in z 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 rewrites61.0%
Taylor expanded in y around inf
Applied rewrites45.9%
if -5.99999999999999946e-8 < y < 1.64999999999999992e222Initial program 67.0%
Taylor expanded in z 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 rewrites49.6%
Taylor expanded in x around 0
Applied rewrites35.9%
Taylor expanded in y around 0
Applied rewrites30.3%
if 1.64999999999999992e222 < y Initial program 75.3%
Taylor expanded in z 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 rewrites46.7%
Taylor expanded in z around 0
Applied rewrites46.7%
Taylor expanded in x around inf
Applied rewrites60.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ (- x t) z)))) (if (<= y -6e-8) t_1 (if (<= y 7.4e+111) (fma a (/ t z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((x - t) / z);
double tmp;
if (y <= -6e-8) {
tmp = t_1;
} else if (y <= 7.4e+111) {
tmp = fma(a, (t / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(x - t) / z)) tmp = 0.0 if (y <= -6e-8) tmp = t_1; elseif (y <= 7.4e+111) tmp = fma(a, Float64(t / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e-8], t$95$1, If[LessEqual[y, 7.4e+111], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x - t}{z}\\
\mathbf{if}\;y \leq -6 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.99999999999999946e-8 or 7.4000000000000005e111 < y Initial program 70.5%
Taylor expanded in z 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 rewrites60.0%
Taylor expanded in y around inf
Applied rewrites44.8%
if -5.99999999999999946e-8 < y < 7.4000000000000005e111Initial program 65.9%
Taylor expanded in z 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 rewrites47.2%
Taylor expanded in x around 0
Applied rewrites33.3%
Taylor expanded in y around 0
Applied rewrites29.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ t z) t))) (if (<= z -2.15e+55) t_1 (if (<= z 6.8e+89) (/ (* y (- x t)) z) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, (t / z), t);
double tmp;
if (z <= -2.15e+55) {
tmp = t_1;
} else if (z <= 6.8e+89) {
tmp = (y * (x - t)) / z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(t / z), t) tmp = 0.0 if (z <= -2.15e+55) tmp = t_1; elseif (z <= 6.8e+89) tmp = Float64(Float64(y * Float64(x - t)) / z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.15e+55], t$95$1, If[LessEqual[z, 6.8e+89], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+89}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1499999999999999e55 or 6.8000000000000004e89 < z Initial program 36.1%
Taylor expanded in z 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 rewrites84.3%
Taylor expanded in x around 0
Applied rewrites56.8%
Taylor expanded in y around 0
Applied rewrites48.7%
if -2.1499999999999999e55 < z < 6.8000000000000004e89Initial program 88.3%
Taylor expanded in z 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 rewrites31.3%
Applied rewrites31.2%
Taylor expanded in y around inf
Applied rewrites23.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.28e+95) (- (* t (/ y z))) (fma a (/ t z) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.28e+95) {
tmp = -(t * (y / z));
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.28e+95) tmp = Float64(-Float64(t * Float64(y / z))); else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.28e+95], (-N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.28 \cdot 10^{+95}:\\
\;\;\;\;-t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if y < -1.28000000000000006e95Initial program 75.5%
Taylor expanded in z 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 rewrites60.6%
Taylor expanded in x around 0
Applied rewrites42.3%
Taylor expanded in y around inf
Applied rewrites31.6%
if -1.28000000000000006e95 < y Initial program 66.1%
Taylor expanded in z 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 rewrites50.4%
Taylor expanded in x around 0
Applied rewrites33.9%
Taylor expanded in y around 0
Applied rewrites28.3%
(FPCore (x y z t a) :precision binary64 (fma a (/ t z) t))
double code(double x, double y, double z, double t, double a) {
return fma(a, (t / z), t);
}
function code(x, y, z, t, a) return fma(a, Float64(t / z), t) end
code[x_, y_, z_, t_, a_] := N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, \frac{t}{z}, t\right)
\end{array}
Initial program 67.7%
Taylor expanded in z 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 rewrites52.2%
Taylor expanded in x around 0
Applied rewrites35.3%
Taylor expanded in y around 0
Applied rewrites25.2%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (t - 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 + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 67.7%
Taylor expanded in z around inf
lower--.f6417.6
Applied rewrites17.6%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 67.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.2
Applied rewrites81.2%
Taylor expanded in t around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.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--.f6441.9
Applied rewrites41.9%
Taylor expanded in z around inf
Applied rewrites2.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024219
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))