
(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 (- x (/ (- z y) (/ (- z a) (- x t)))))
(t_2 (- x (/ (* (- x t) (- z y)) (- z a)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-255)
t_2
(if (<= t_2 0.0) (- t (* (- y a) (/ (- t x) z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) / ((z - a) / (x - t)));
double t_2 = x - (((x - t) * (z - y)) / (z - a));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - ((y - a) * ((t - x) / z));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) / ((z - a) / (x - t)));
double t_2 = x - (((x - t) * (z - y)) / (z - a));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - ((y - a) * ((t - x) / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((z - y) / ((z - a) / (x - t))) t_2 = x - (((x - t) * (z - y)) / (z - a)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-255: tmp = t_2 elif t_2 <= 0.0: tmp = t - ((y - a) * ((t - x) / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))) t_2 = Float64(x - Float64(Float64(Float64(x - t) * Float64(z - y)) / Float64(z - a))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((z - y) / ((z - a) / (x - t))); t_2 = x - (((x - t) * (z - y)) / (z - a)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t - ((y - a) * ((t - x) / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(x - t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-255], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z - y}{\frac{z - a}{x - t}}\\
t_2 := x - \frac{\left(x - t\right) \cdot \left(z - y\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-255}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 68.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-255Initial program 97.2%
if -1e-255 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 8.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6499.8
Applied rewrites99.8%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y x) z)) (t_2 (fma x (/ z a) x)))
(if (<= a -3.3e+28)
t_2
(if (<= a -2e-139)
t_1
(if (<= a 1.28e-259) (+ (- t x) x) (if (<= a 0.06) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * x) / z;
double t_2 = fma(x, (z / a), x);
double tmp;
if (a <= -3.3e+28) {
tmp = t_2;
} else if (a <= -2e-139) {
tmp = t_1;
} else if (a <= 1.28e-259) {
tmp = (t - x) + x;
} else if (a <= 0.06) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y * x) / z) t_2 = fma(x, Float64(z / a), x) tmp = 0.0 if (a <= -3.3e+28) tmp = t_2; elseif (a <= -2e-139) tmp = t_1; elseif (a <= 1.28e-259) tmp = Float64(Float64(t - x) + x); elseif (a <= 0.06) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.3e+28], t$95$2, If[LessEqual[a, -2e-139], t$95$1, If[LessEqual[a, 1.28e-259], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 0.06], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot x}{z}\\
t_2 := \mathsf{fma}\left(x, \frac{z}{a}, x\right)\\
\mathbf{if}\;a \leq -3.3 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.28 \cdot 10^{-259}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{elif}\;a \leq 0.06:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -3.3e28 or 0.059999999999999998 < a Initial program 70.9%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/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--.f6456.0
Applied rewrites56.0%
Taylor expanded in y around 0
Applied rewrites49.1%
Taylor expanded in z around 0
Applied rewrites47.9%
if -3.3e28 < a < -2.00000000000000006e-139 or 1.27999999999999998e-259 < a < 0.059999999999999998Initial program 71.5%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/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--.f6446.1
Applied rewrites46.1%
Taylor expanded in y around inf
Applied rewrites46.7%
Taylor expanded in a around 0
Applied rewrites37.9%
if -2.00000000000000006e-139 < a < 1.27999999999999998e-259Initial program 75.7%
Taylor expanded in z around inf
lower--.f6448.2
Applied rewrites48.2%
Final simplification44.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -1.12e-115)
t_1
(if (<= a -2.45e-306)
(* (/ (- z y) z) t)
(if (<= a 3e-11) (* (/ y (- z a)) (- x t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -1.12e-115) {
tmp = t_1;
} else if (a <= -2.45e-306) {
tmp = ((z - y) / z) * t;
} else if (a <= 3e-11) {
tmp = (y / (z - a)) * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -1.12e-115) tmp = t_1; elseif (a <= -2.45e-306) tmp = Float64(Float64(Float64(z - y) / z) * t); elseif (a <= 3e-11) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.12e-115], t$95$1, If[LessEqual[a, -2.45e-306], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[a, 3e-11], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -1.12 \cdot 10^{-115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.45 \cdot 10^{-306}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-11}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.1199999999999999e-115 or 3e-11 < a Initial program 71.8%
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%
if -1.1199999999999999e-115 < a < -2.45000000000000012e-306Initial program 71.4%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.3
Applied rewrites71.3%
Taylor expanded in a around 0
Applied rewrites81.6%
if -2.45000000000000012e-306 < a < 3e-11Initial program 72.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.2
Applied rewrites60.2%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- t x) a) y x)))
(if (<= a -6400000.0)
t_1
(if (<= a -2.45e-306)
(* (/ (- z y) z) t)
(if (<= a 2.85e-11) (* (/ y (- z a)) (- x t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), y, x);
double tmp;
if (a <= -6400000.0) {
tmp = t_1;
} else if (a <= -2.45e-306) {
tmp = ((z - y) / z) * t;
} else if (a <= 2.85e-11) {
tmp = (y / (z - a)) * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), y, x) tmp = 0.0 if (a <= -6400000.0) tmp = t_1; elseif (a <= -2.45e-306) tmp = Float64(Float64(Float64(z - y) / z) * t); elseif (a <= 2.85e-11) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[a, -6400000.0], t$95$1, If[LessEqual[a, -2.45e-306], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[a, 2.85e-11], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{if}\;a \leq -6400000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.45 \cdot 10^{-306}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{elif}\;a \leq 2.85 \cdot 10^{-11}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.4e6 or 2.8499999999999999e-11 < a Initial program 71.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.4
Applied rewrites75.4%
if -6.4e6 < a < -2.45000000000000012e-306Initial program 71.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.6
Applied rewrites60.6%
Taylor expanded in a around 0
Applied rewrites65.4%
if -2.45000000000000012e-306 < a < 2.8499999999999999e-11Initial program 72.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.2
Applied rewrites60.2%
Final simplification69.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (- y a) (/ (- t x) z)))))
(if (<= z -2.05e+127)
t_1
(if (<= z 3e+86) (- x (/ (* (- x t) (- z y)) (- z a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y - a) * ((t - x) / z));
double tmp;
if (z <= -2.05e+127) {
tmp = t_1;
} else if (z <= 3e+86) {
tmp = x - (((x - t) * (z - 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 = t - ((y - a) * ((t - x) / z))
if (z <= (-2.05d+127)) then
tmp = t_1
else if (z <= 3d+86) then
tmp = x - (((x - t) * (z - 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 = t - ((y - a) * ((t - x) / z));
double tmp;
if (z <= -2.05e+127) {
tmp = t_1;
} else if (z <= 3e+86) {
tmp = x - (((x - t) * (z - y)) / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y - a) * ((t - x) / z)) tmp = 0 if z <= -2.05e+127: tmp = t_1 elif z <= 3e+86: tmp = x - (((x - t) * (z - y)) / (z - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -2.05e+127) tmp = t_1; elseif (z <= 3e+86) tmp = Float64(x - Float64(Float64(Float64(x - t) * Float64(z - y)) / Float64(z - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y - a) * ((t - x) / z)); tmp = 0.0; if (z <= -2.05e+127) tmp = t_1; elseif (z <= 3e+86) tmp = x - (((x - t) * (z - y)) / (z - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+127], t$95$1, If[LessEqual[z, 3e+86], N[(x - N[(N[(N[(x - t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+86}:\\
\;\;\;\;x - \frac{\left(x - t\right) \cdot \left(z - y\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.04999999999999991e127 or 2.99999999999999977e86 < z Initial program 35.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.1
Applied rewrites80.1%
if -2.04999999999999991e127 < z < 2.99999999999999977e86Initial program 86.2%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -75000000000.0)
(fma (- y z) (/ (- t x) a) x)
(if (<= a 5.7e-11)
(- t (/ (* (- y a) (- t x)) z))
(+ (* (/ (- z y) a) (- x t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -75000000000.0) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (a <= 5.7e-11) {
tmp = t - (((y - a) * (t - x)) / z);
} else {
tmp = (((z - y) / a) * (x - t)) + x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -75000000000.0) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (a <= 5.7e-11) tmp = Float64(t - Float64(Float64(Float64(y - a) * Float64(t - x)) / z)); else tmp = Float64(Float64(Float64(Float64(z - y) / a) * Float64(x - t)) + x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -75000000000.0], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 5.7e-11], N[(t - N[(N[(N[(y - a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -75000000000:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{-11}:\\
\;\;\;\;t - \frac{\left(y - a\right) \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{a} \cdot \left(x - t\right) + x\\
\end{array}
\end{array}
if a < -7.5e10Initial program 77.0%
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--.f6485.1
Applied rewrites85.1%
if -7.5e10 < a < 5.6999999999999997e-11Initial program 71.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6473.2
Applied rewrites73.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6432.3
Applied rewrites32.3%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites79.7%
if 5.6999999999999997e-11 < a Initial program 66.5%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6483.8
Applied rewrites83.8%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -75000000000.0)
t_1
(if (<= a 5.7e-11) (- t (/ (* (- y a) (- t x)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -75000000000.0) {
tmp = t_1;
} else if (a <= 5.7e-11) {
tmp = t - (((y - a) * (t - x)) / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -75000000000.0) tmp = t_1; elseif (a <= 5.7e-11) tmp = Float64(t - Float64(Float64(Float64(y - a) * Float64(t - x)) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -75000000000.0], t$95$1, If[LessEqual[a, 5.7e-11], N[(t - N[(N[(N[(y - a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -75000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{-11}:\\
\;\;\;\;t - \frac{\left(y - a\right) \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.5e10 or 5.6999999999999997e-11 < a Initial program 71.8%
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.8
Applied rewrites83.8%
if -7.5e10 < a < 5.6999999999999997e-11Initial program 71.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6473.2
Applied rewrites73.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6432.3
Applied rewrites32.3%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites79.7%
Final simplification81.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -75000000000.0)
t_1
(if (<= a 6e-11) (- t (* (- y a) (/ (- t x) z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -75000000000.0) {
tmp = t_1;
} else if (a <= 6e-11) {
tmp = t - ((y - a) * ((t - x) / z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -75000000000.0) tmp = t_1; elseif (a <= 6e-11) tmp = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -75000000000.0], t$95$1, If[LessEqual[a, 6e-11], N[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -75000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-11}:\\
\;\;\;\;t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.5e10 or 6e-11 < a Initial program 71.8%
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.8
Applied rewrites83.8%
if -7.5e10 < a < 6e-11Initial program 71.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6479.6
Applied rewrites79.6%
Final simplification81.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -4.2e-56)
t_1
(if (<= a 3.2e-74) (fma (/ (- z y) z) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -4.2e-56) {
tmp = t_1;
} else if (a <= 3.2e-74) {
tmp = fma(((z - y) / z), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -4.2e-56) tmp = t_1; elseif (a <= 3.2e-74) tmp = fma(Float64(Float64(z - y) / 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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -4.2e-56], t$95$1, If[LessEqual[a, 3.2e-74], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -4.2 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - y}{z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.20000000000000012e-56 or 3.1999999999999999e-74 < a Initial program 70.1%
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.1
Applied rewrites77.1%
if -4.20000000000000012e-56 < a < 3.1999999999999999e-74Initial program 74.6%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-neg-fracN/A
mul-1-negN/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--.f6469.5
Applied rewrites69.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ t (- z a)) (- z y))))
(if (<= t -6.5e-44)
t_1
(if (<= t 2.4e+30) (fma (- z y) (/ x (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / (z - a)) * (z - y);
double tmp;
if (t <= -6.5e-44) {
tmp = t_1;
} else if (t <= 2.4e+30) {
tmp = fma((z - y), (x / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t / Float64(z - a)) * Float64(z - y)) tmp = 0.0 if (t <= -6.5e-44) tmp = t_1; elseif (t <= 2.4e+30) tmp = fma(Float64(z - y), Float64(x / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e-44], t$95$1, If[LessEqual[t, 2.4e+30], N[(N[(z - y), $MachinePrecision] * N[(x / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(z - y, \frac{x}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5e-44 or 2.3999999999999999e30 < t Initial program 67.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.7
Applied rewrites75.7%
if -6.5e-44 < t < 2.3999999999999999e30Initial program 76.4%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/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--.f6470.8
Applied rewrites70.8%
Final simplification73.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ t (- z a)) (- z y)))) (if (<= t -6.8e-44) t_1 (if (<= t 3.3e+30) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / (z - a)) * (z - y);
double tmp;
if (t <= -6.8e-44) {
tmp = t_1;
} else if (t <= 3.3e+30) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t / Float64(z - a)) * Float64(z - y)) tmp = 0.0 if (t <= -6.8e-44) tmp = t_1; elseif (t <= 3.3e+30) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e-44], t$95$1, If[LessEqual[t, 3.3e+30], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.80000000000000033e-44 or 3.30000000000000026e30 < t Initial program 67.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.7
Applied rewrites75.7%
if -6.80000000000000033e-44 < t < 3.30000000000000026e30Initial program 76.4%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Final simplification67.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- t x) a) y x))) (if (<= a -6400000.0) t_1 (if (<= a 3.25e-74) (* (/ (- z y) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), y, x);
double tmp;
if (a <= -6400000.0) {
tmp = t_1;
} else if (a <= 3.25e-74) {
tmp = ((z - y) / z) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), y, x) tmp = 0.0 if (a <= -6400000.0) tmp = t_1; elseif (a <= 3.25e-74) tmp = Float64(Float64(Float64(z - y) / z) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[a, -6400000.0], t$95$1, If[LessEqual[a, 3.25e-74], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{if}\;a \leq -6400000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.25 \cdot 10^{-74}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.4e6 or 3.2500000000000001e-74 < a Initial program 71.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.3
Applied rewrites72.3%
if -6.4e6 < a < 3.2500000000000001e-74Initial program 72.8%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.4
Applied rewrites56.4%
Taylor expanded in a around 0
Applied rewrites60.4%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ z (- z a)) t))) (if (<= z -2.1e+174) t_1 (if (<= z 8.6e+116) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / (z - a)) * t;
double tmp;
if (z <= -2.1e+174) {
tmp = t_1;
} else if (z <= 8.6e+116) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z / Float64(z - a)) * t) tmp = 0.0 if (z <= -2.1e+174) tmp = t_1; elseif (z <= 8.6e+116) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -2.1e+174], t$95$1, If[LessEqual[z, 8.6e+116], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{z - a} \cdot t\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+116}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.10000000000000017e174 or 8.6e116 < z Initial program 35.3%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6459.6
Applied rewrites59.6%
Taylor expanded in y around 0
Applied rewrites63.9%
if -2.10000000000000017e174 < z < 8.6e116Initial program 82.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6467.1
Applied rewrites67.1%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -2.2e+174) t_1 (if (<= z 5e+140) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -2.2e+174) {
tmp = t_1;
} else if (z <= 5e+140) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -2.2e+174) tmp = t_1; elseif (z <= 5e+140) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -2.2e+174], t$95$1, If[LessEqual[z, 5e+140], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+140}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.2000000000000002e174 or 5.00000000000000008e140 < z Initial program 35.8%
Taylor expanded in z around inf
lower--.f6451.7
Applied rewrites51.7%
if -2.2000000000000002e174 < z < 5.00000000000000008e140Initial program 81.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6465.9
Applied rewrites65.9%
Final simplification63.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -2.4e+174) t_1 (if (<= z 4.5e+140) (+ (* (/ y a) t) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -2.4e+174) {
tmp = t_1;
} else if (z <= 4.5e+140) {
tmp = ((y / a) * 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 - x) + x
if (z <= (-2.4d+174)) then
tmp = t_1
else if (z <= 4.5d+140) then
tmp = ((y / a) * 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 - x) + x;
double tmp;
if (z <= -2.4e+174) {
tmp = t_1;
} else if (z <= 4.5e+140) {
tmp = ((y / a) * t) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -2.4e+174: tmp = t_1 elif z <= 4.5e+140: tmp = ((y / a) * t) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -2.4e+174) tmp = t_1; elseif (z <= 4.5e+140) tmp = Float64(Float64(Float64(y / a) * t) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) + x; tmp = 0.0; if (z <= -2.4e+174) tmp = t_1; elseif (z <= 4.5e+140) tmp = ((y / a) * t) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -2.4e+174], t$95$1, If[LessEqual[z, 4.5e+140], N[(N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+140}:\\
\;\;\;\;\frac{y}{a} \cdot t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.3999999999999998e174 or 4.5000000000000002e140 < z Initial program 35.8%
Taylor expanded in z around inf
lower--.f6451.7
Applied rewrites51.7%
if -2.3999999999999998e174 < z < 4.5000000000000002e140Initial program 81.0%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6470.5
Applied rewrites70.5%
Taylor expanded in t around inf
Applied rewrites53.8%
Taylor expanded in y around inf
Applied rewrites56.2%
Final simplification55.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -2.2e+174) t_1 (if (<= z 4.5e+140) (fma (/ t a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -2.2e+174) {
tmp = t_1;
} else if (z <= 4.5e+140) {
tmp = fma((t / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -2.2e+174) tmp = t_1; elseif (z <= 4.5e+140) tmp = fma(Float64(t / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -2.2e+174], t$95$1, If[LessEqual[z, 4.5e+140], N[(N[(t / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+140}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.2000000000000002e174 or 4.5000000000000002e140 < z Initial program 35.8%
Taylor expanded in z around inf
lower--.f6451.7
Applied rewrites51.7%
if -2.2000000000000002e174 < z < 4.5000000000000002e140Initial program 81.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6489.2
Applied rewrites89.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6465.9
Applied rewrites65.9%
Taylor expanded in t around inf
Applied rewrites55.2%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -1.22e+160) t_1 (if (<= z 4e+55) (* (/ y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -1.22e+160) {
tmp = t_1;
} else if (z <= 4e+55) {
tmp = (y / a) * t;
} 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 - x) + x
if (z <= (-1.22d+160)) then
tmp = t_1
else if (z <= 4d+55) then
tmp = (y / a) * t
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 - x) + x;
double tmp;
if (z <= -1.22e+160) {
tmp = t_1;
} else if (z <= 4e+55) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -1.22e+160: tmp = t_1 elif z <= 4e+55: tmp = (y / a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -1.22e+160) tmp = t_1; elseif (z <= 4e+55) tmp = Float64(Float64(y / a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) + x; tmp = 0.0; if (z <= -1.22e+160) tmp = t_1; elseif (z <= 4e+55) tmp = (y / a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.22e+160], t$95$1, If[LessEqual[z, 4e+55], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+55}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.22e160 or 4.00000000000000004e55 < z Initial program 40.3%
Taylor expanded in z around inf
lower--.f6442.0
Applied rewrites42.0%
if -1.22e160 < z < 4.00000000000000004e55Initial program 85.2%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6440.3
Applied rewrites40.3%
Taylor expanded in a around inf
Applied rewrites31.5%
Taylor expanded in z around 0
Applied rewrites28.5%
Final simplification32.5%
(FPCore (x y z t a) :precision binary64 (+ (- t x) x))
double code(double x, double y, double z, double t, double a) {
return (t - 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 = (t - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
def code(x, y, z, t, a): return (t - x) + x
function code(x, y, z, t, a) return Float64(Float64(t - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (t - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(t - x\right) + x
\end{array}
Initial program 71.8%
Taylor expanded in z around inf
lower--.f6418.6
Applied rewrites18.6%
Final simplification18.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 71.8%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/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--.f6447.4
Applied rewrites47.4%
Taylor expanded in z around inf
Applied rewrites2.6%
(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 2024235
(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))))