
(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 21 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 (- t x) (/ (- z y) (- z a)) x))
(t_2 (- x (/ (* (- x t) (- y z)) (- a z)))))
(if (<= t_2 -2e-294) t_1 (if (<= t_2 0.0) (- t (/ (* (- a y) x) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((z - y) / (z - a)), x);
double t_2 = x - (((x - t) * (y - z)) / (a - z));
double tmp;
if (t_2 <= -2e-294) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - (((a - y) * x) / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(z - y) / Float64(z - a)), x) t_2 = Float64(x - Float64(Float64(Float64(x - t) * Float64(y - z)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -2e-294) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(a - y) * x) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(x - t), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-294], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(a - y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{z - y}{z - a}, x\right)\\
t_2 := x - \frac{\left(x - t\right) \cdot \left(y - z\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{\left(a - y\right) \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000003e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 76.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.3
Applied rewrites91.3%
if -2.00000000000000003e-294 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f644.5
Applied rewrites4.5%
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 rewrites99.6%
Taylor expanded in x around inf
Applied rewrites99.6%
Final simplification91.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (* (- a y) x) z))))
(if (<= z -1.9e+77)
t_1
(if (<= z -1.25e-127)
(fma (- z y) (/ x (- a z)) x)
(if (<= z 1e+47)
(fma (- t x) (/ (- y z) a) x)
(if (<= z 2.2e+161) (* (/ t (- z a)) (- z y)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((a - y) * x) / z);
double tmp;
if (z <= -1.9e+77) {
tmp = t_1;
} else if (z <= -1.25e-127) {
tmp = fma((z - y), (x / (a - z)), x);
} else if (z <= 1e+47) {
tmp = fma((t - x), ((y - z) / a), x);
} else if (z <= 2.2e+161) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(a - y) * x) / z)) tmp = 0.0 if (z <= -1.9e+77) tmp = t_1; elseif (z <= -1.25e-127) tmp = fma(Float64(z - y), Float64(x / Float64(a - z)), x); elseif (z <= 1e+47) tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x); elseif (z <= 2.2e+161) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(a - y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+77], t$95$1, If[LessEqual[z, -1.25e-127], N[(N[(z - y), $MachinePrecision] * N[(x / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1e+47], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.2e+161], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{\left(a - y\right) \cdot x}{z}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-127}:\\
\;\;\;\;\mathsf{fma}\left(z - y, \frac{x}{a - z}, x\right)\\
\mathbf{elif}\;z \leq 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+161}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9000000000000001e77 or 2.2e161 < z Initial program 36.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6464.7
Applied rewrites64.7%
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 rewrites72.1%
Taylor expanded in x around inf
Applied rewrites74.2%
if -1.9000000000000001e77 < z < -1.2499999999999999e-127Initial program 86.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
Applied rewrites65.5%
if -1.2499999999999999e-127 < z < 1e47Initial program 90.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.8
Applied rewrites94.8%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6482.6
Applied rewrites82.6%
if 1e47 < z < 2.2e161Initial program 57.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.0
Applied rewrites74.0%
Final simplification76.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.48e+203)
(* (/ z (- z a)) t)
(if (<= z -1.25e-127)
(fma (- z y) (/ x (- a z)) x)
(if (<= z 1e+47)
(fma (- t x) (/ (- y z) a) x)
(if (<= z 6.4e+164)
(* (/ t (- z a)) (- z y))
(fma a (/ (- t x) z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.48e+203) {
tmp = (z / (z - a)) * t;
} else if (z <= -1.25e-127) {
tmp = fma((z - y), (x / (a - z)), x);
} else if (z <= 1e+47) {
tmp = fma((t - x), ((y - z) / a), x);
} else if (z <= 6.4e+164) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = fma(a, ((t - x) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.48e+203) tmp = Float64(Float64(z / Float64(z - a)) * t); elseif (z <= -1.25e-127) tmp = fma(Float64(z - y), Float64(x / Float64(a - z)), x); elseif (z <= 1e+47) tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x); elseif (z <= 6.4e+164) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = fma(a, Float64(Float64(t - x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.48e+203], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -1.25e-127], N[(N[(z - y), $MachinePrecision] * N[(x / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1e+47], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.4e+164], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+203}:\\
\;\;\;\;\frac{z}{z - a} \cdot t\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-127}:\\
\;\;\;\;\mathsf{fma}\left(z - y, \frac{x}{a - z}, x\right)\\
\mathbf{elif}\;z \leq 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+164}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.4799999999999999e203Initial program 30.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6469.5
Applied rewrites69.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in y around 0
Applied rewrites91.3%
if -1.4799999999999999e203 < z < -1.2499999999999999e-127Initial program 77.6%
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
Applied rewrites55.3%
if -1.2499999999999999e-127 < z < 1e47Initial program 90.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.8
Applied rewrites94.8%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6482.6
Applied rewrites82.6%
if 1e47 < z < 6.3999999999999996e164Initial program 55.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.9
Applied rewrites70.9%
if 6.3999999999999996e164 < z Initial program 22.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6454.3
Applied rewrites54.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 rewrites74.1%
Taylor expanded in y around 0
Applied rewrites80.3%
Final simplification74.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.48e+203)
(* (/ z (- z a)) t)
(if (<= z -1.25e-127)
(fma (- z y) (/ x (- a z)) x)
(if (<= z 1.04e+46)
(fma (- y z) (/ (- t x) a) x)
(if (<= z 6.4e+164)
(* (/ t (- z a)) (- z y))
(fma a (/ (- t x) z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.48e+203) {
tmp = (z / (z - a)) * t;
} else if (z <= -1.25e-127) {
tmp = fma((z - y), (x / (a - z)), x);
} else if (z <= 1.04e+46) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (z <= 6.4e+164) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = fma(a, ((t - x) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.48e+203) tmp = Float64(Float64(z / Float64(z - a)) * t); elseif (z <= -1.25e-127) tmp = fma(Float64(z - y), Float64(x / Float64(a - z)), x); elseif (z <= 1.04e+46) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (z <= 6.4e+164) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = fma(a, Float64(Float64(t - x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.48e+203], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -1.25e-127], N[(N[(z - y), $MachinePrecision] * N[(x / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.04e+46], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.4e+164], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+203}:\\
\;\;\;\;\frac{z}{z - a} \cdot t\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-127}:\\
\;\;\;\;\mathsf{fma}\left(z - y, \frac{x}{a - z}, x\right)\\
\mathbf{elif}\;z \leq 1.04 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+164}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.4799999999999999e203Initial program 30.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6469.5
Applied rewrites69.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in y around 0
Applied rewrites91.3%
if -1.4799999999999999e203 < z < -1.2499999999999999e-127Initial program 77.6%
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
Applied rewrites55.3%
if -1.2499999999999999e-127 < z < 1.04000000000000003e46Initial program 90.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--.f6481.0
Applied rewrites81.0%
if 1.04000000000000003e46 < z < 6.3999999999999996e164Initial program 55.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.9
Applied rewrites70.9%
if 6.3999999999999996e164 < z Initial program 22.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6454.3
Applied rewrites54.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 rewrites74.1%
Taylor expanded in y around 0
Applied rewrites80.3%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.48e+203)
(* (/ z (- z a)) t)
(if (<= z -1.3e+76)
(* (/ y (- z a)) (- x t))
(if (<= z 1.04e+46)
(fma (- y z) (/ (- t x) a) x)
(if (<= z 6.4e+164)
(* (/ t (- z a)) (- z y))
(fma a (/ (- t x) z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.48e+203) {
tmp = (z / (z - a)) * t;
} else if (z <= -1.3e+76) {
tmp = (y / (z - a)) * (x - t);
} else if (z <= 1.04e+46) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (z <= 6.4e+164) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = fma(a, ((t - x) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.48e+203) tmp = Float64(Float64(z / Float64(z - a)) * t); elseif (z <= -1.3e+76) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); elseif (z <= 1.04e+46) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (z <= 6.4e+164) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = fma(a, Float64(Float64(t - x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.48e+203], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -1.3e+76], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.04e+46], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.4e+164], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+203}:\\
\;\;\;\;\frac{z}{z - a} \cdot t\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+76}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 1.04 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+164}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.4799999999999999e203Initial program 30.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6469.5
Applied rewrites69.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in y around 0
Applied rewrites91.3%
if -1.4799999999999999e203 < z < -1.3e76Initial program 60.3%
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--.f6451.9
Applied rewrites51.9%
if -1.3e76 < z < 1.04000000000000003e46Initial program 89.4%
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.2
Applied rewrites73.2%
if 1.04000000000000003e46 < z < 6.3999999999999996e164Initial program 55.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.9
Applied rewrites70.9%
if 6.3999999999999996e164 < z Initial program 22.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6454.3
Applied rewrites54.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 rewrites74.1%
Taylor expanded in y around 0
Applied rewrites80.3%
Final simplification73.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.48e+203)
(* (/ z (- z a)) t)
(if (<= z -4.1e+80)
(* (/ y (- z a)) (- x t))
(if (<= z 1.25e-79)
(fma (- t x) (/ y a) x)
(if (<= z 6.4e+164)
(* (/ t (- z a)) (- z y))
(fma a (/ (- t x) z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.48e+203) {
tmp = (z / (z - a)) * t;
} else if (z <= -4.1e+80) {
tmp = (y / (z - a)) * (x - t);
} else if (z <= 1.25e-79) {
tmp = fma((t - x), (y / a), x);
} else if (z <= 6.4e+164) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = fma(a, ((t - x) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.48e+203) tmp = Float64(Float64(z / Float64(z - a)) * t); elseif (z <= -4.1e+80) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); elseif (z <= 1.25e-79) tmp = fma(Float64(t - x), Float64(y / a), x); elseif (z <= 6.4e+164) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = fma(a, Float64(Float64(t - x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.48e+203], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -4.1e+80], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-79], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.4e+164], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+203}:\\
\;\;\;\;\frac{z}{z - a} \cdot t\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+80}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-79}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+164}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.4799999999999999e203Initial program 30.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6469.5
Applied rewrites69.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in y around 0
Applied rewrites91.3%
if -1.4799999999999999e203 < z < -4.10000000000000001e80Initial program 58.6%
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--.f6454.0
Applied rewrites54.0%
if -4.10000000000000001e80 < z < 1.25e-79Initial program 90.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6496.1
Applied rewrites96.1%
Taylor expanded in z around 0
lower-/.f6474.7
Applied rewrites74.7%
if 1.25e-79 < z < 6.3999999999999996e164Initial program 69.5%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.3
Applied rewrites60.3%
if 6.3999999999999996e164 < z Initial program 22.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6454.3
Applied rewrites54.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 rewrites74.1%
Taylor expanded in y around 0
Applied rewrites80.3%
Final simplification72.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y a) x) z)) (t_2 (+ (- t x) x)))
(if (<= z -1.96e+198)
t_2
(if (<= z -1.24e-114)
t_1
(if (<= z 2.2e+161)
(* (/ y (- a z)) t)
(if (<= z 2.9e+211) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - a) * x) / z;
double t_2 = (t - x) + x;
double tmp;
if (z <= -1.96e+198) {
tmp = t_2;
} else if (z <= -1.24e-114) {
tmp = t_1;
} else if (z <= 2.2e+161) {
tmp = (y / (a - z)) * t;
} else if (z <= 2.9e+211) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = ((y - a) * x) / z
t_2 = (t - x) + x
if (z <= (-1.96d+198)) then
tmp = t_2
else if (z <= (-1.24d-114)) then
tmp = t_1
else if (z <= 2.2d+161) then
tmp = (y / (a - z)) * t
else if (z <= 2.9d+211) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - a) * x) / z;
double t_2 = (t - x) + x;
double tmp;
if (z <= -1.96e+198) {
tmp = t_2;
} else if (z <= -1.24e-114) {
tmp = t_1;
} else if (z <= 2.2e+161) {
tmp = (y / (a - z)) * t;
} else if (z <= 2.9e+211) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - a) * x) / z t_2 = (t - x) + x tmp = 0 if z <= -1.96e+198: tmp = t_2 elif z <= -1.24e-114: tmp = t_1 elif z <= 2.2e+161: tmp = (y / (a - z)) * t elif z <= 2.9e+211: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - a) * x) / z) t_2 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -1.96e+198) tmp = t_2; elseif (z <= -1.24e-114) tmp = t_1; elseif (z <= 2.2e+161) tmp = Float64(Float64(y / Float64(a - z)) * t); elseif (z <= 2.9e+211) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - a) * x) / z; t_2 = (t - x) + x; tmp = 0.0; if (z <= -1.96e+198) tmp = t_2; elseif (z <= -1.24e-114) tmp = t_1; elseif (z <= 2.2e+161) tmp = (y / (a - z)) * t; elseif (z <= 2.9e+211) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.96e+198], t$95$2, If[LessEqual[z, -1.24e-114], t$95$1, If[LessEqual[z, 2.2e+161], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.9e+211], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - a\right) \cdot x}{z}\\
t_2 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -1.96 \cdot 10^{+198}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.24 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+161}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+211}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.9600000000000001e198 or 2.9e211 < z Initial program 23.4%
Taylor expanded in z around inf
lower--.f6458.6
Applied rewrites58.6%
if -1.9600000000000001e198 < z < -1.24000000000000003e-114 or 2.2e161 < z < 2.9e211Initial program 70.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6478.8
Applied rewrites78.8%
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 rewrites63.7%
Taylor expanded in x around inf
Applied rewrites36.5%
if -1.24000000000000003e-114 < z < 2.2e161Initial program 85.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.6
Applied rewrites92.6%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6445.0
Applied rewrites45.0%
Taylor expanded in y around inf
Applied rewrites35.4%
Final simplification39.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.48e+203)
(* (/ z (- z a)) t)
(if (<= z -4.1e+80)
(* (/ y (- z a)) (- x t))
(if (<= z 5e+62) (fma (- t x) (/ y a) x) (fma a (/ (- t x) z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.48e+203) {
tmp = (z / (z - a)) * t;
} else if (z <= -4.1e+80) {
tmp = (y / (z - a)) * (x - t);
} else if (z <= 5e+62) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = fma(a, ((t - x) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.48e+203) tmp = Float64(Float64(z / Float64(z - a)) * t); elseif (z <= -4.1e+80) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); elseif (z <= 5e+62) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = fma(a, Float64(Float64(t - x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.48e+203], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -4.1e+80], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+62], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+203}:\\
\;\;\;\;\frac{z}{z - a} \cdot t\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+80}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.4799999999999999e203Initial program 30.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6469.5
Applied rewrites69.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in y around 0
Applied rewrites91.3%
if -1.4799999999999999e203 < z < -4.10000000000000001e80Initial program 58.6%
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--.f6454.0
Applied rewrites54.0%
if -4.10000000000000001e80 < z < 5.00000000000000029e62Initial program 89.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.8
Applied rewrites94.8%
Taylor expanded in z around 0
lower-/.f6470.7
Applied rewrites70.7%
if 5.00000000000000029e62 < z Initial program 35.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6462.9
Applied rewrites62.9%
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 rewrites73.4%
Taylor expanded in y around 0
Applied rewrites67.6%
Final simplification70.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (- t x) x)))
(if (<= z -1.96e+198)
t_1
(if (<= z -1.1e+121)
(/ (* (- y a) x) z)
(if (<= z 1e+64) (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 <= -1.96e+198) {
tmp = t_1;
} else if (z <= -1.1e+121) {
tmp = ((y - a) * x) / z;
} else if (z <= 1e+64) {
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 <= -1.96e+198) tmp = t_1; elseif (z <= -1.1e+121) tmp = Float64(Float64(Float64(y - a) * x) / z); elseif (z <= 1e+64) 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, -1.96e+198], t$95$1, If[LessEqual[z, -1.1e+121], N[(N[(N[(y - a), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1e+64], 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 -1.96 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+121}:\\
\;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\
\mathbf{elif}\;z \leq 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9600000000000001e198 or 1.00000000000000002e64 < z Initial program 34.3%
Taylor expanded in z around inf
lower--.f6442.6
Applied rewrites42.6%
if -1.9600000000000001e198 < z < -1.10000000000000001e121Initial program 64.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6475.8
Applied rewrites75.8%
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 rewrites63.6%
Taylor expanded in x around inf
Applied rewrites45.3%
if -1.10000000000000001e121 < z < 1.00000000000000002e64Initial program 88.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6468.8
Applied rewrites68.8%
Final simplification59.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -6.3e-24)
(fma (- t x) (/ (- y z) a) x)
(if (<= a 2.8e+42)
(- t (/ (* (- x t) (- a y)) z))
(fma (- t x) (/ (- z) (- a z)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.3e-24) {
tmp = fma((t - x), ((y - z) / a), x);
} else if (a <= 2.8e+42) {
tmp = t - (((x - t) * (a - y)) / z);
} else {
tmp = fma((t - x), (-z / (a - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.3e-24) tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x); elseif (a <= 2.8e+42) tmp = Float64(t - Float64(Float64(Float64(x - t) * Float64(a - y)) / z)); else tmp = fma(Float64(t - x), Float64(Float64(-z) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.3e-24], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.8e+42], N[(t - N[(N[(N[(x - t), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[((-z) / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.3 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+42}:\\
\;\;\;\;t - \frac{\left(x - t\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{-z}{a - z}, x\right)\\
\end{array}
\end{array}
if a < -6.29999999999999979e-24Initial program 72.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.6
Applied rewrites92.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6486.0
Applied rewrites86.0%
if -6.29999999999999979e-24 < a < 2.7999999999999999e42Initial program 68.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6475.9
Applied rewrites75.9%
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 rewrites81.4%
if 2.7999999999999999e42 < a Initial program 74.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.9
Applied rewrites93.9%
Taylor expanded in y around 0
mul-1-negN/A
lower-neg.f6471.9
Applied rewrites71.9%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- y z) a) x)))
(if (<= a -6.3e-24)
t_1
(if (<= a 6.4e+64) (- t (/ (* (- x t) (- a y)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / a), x);
double tmp;
if (a <= -6.3e-24) {
tmp = t_1;
} else if (a <= 6.4e+64) {
tmp = t - (((x - t) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(y - z) / a), x) tmp = 0.0 if (a <= -6.3e-24) tmp = t_1; elseif (a <= 6.4e+64) tmp = Float64(t - Float64(Float64(Float64(x - t) * Float64(a - y)) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -6.3e-24], t$95$1, If[LessEqual[a, 6.4e+64], N[(t - N[(N[(N[(x - t), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\mathbf{if}\;a \leq -6.3 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{+64}:\\
\;\;\;\;t - \frac{\left(x - t\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.29999999999999979e-24 or 6.40000000000000037e64 < a Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.2
Applied rewrites93.2%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6479.7
Applied rewrites79.7%
if -6.29999999999999979e-24 < a < 6.40000000000000037e64Initial program 69.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6476.8
Applied rewrites76.8%
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 rewrites80.1%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y) (/ t z))))
(if (<= y -8.5e+95)
t_1
(if (<= y 6.4e+16)
(+ (- t x) x)
(if (<= y 3.4e+237) (/ (* y x) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (t / z);
double tmp;
if (y <= -8.5e+95) {
tmp = t_1;
} else if (y <= 6.4e+16) {
tmp = (t - x) + x;
} else if (y <= 3.4e+237) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -y * (t / z)
if (y <= (-8.5d+95)) then
tmp = t_1
else if (y <= 6.4d+16) then
tmp = (t - x) + x
else if (y <= 3.4d+237) then
tmp = (y * x) / z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (t / z);
double tmp;
if (y <= -8.5e+95) {
tmp = t_1;
} else if (y <= 6.4e+16) {
tmp = (t - x) + x;
} else if (y <= 3.4e+237) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y * (t / z) tmp = 0 if y <= -8.5e+95: tmp = t_1 elif y <= 6.4e+16: tmp = (t - x) + x elif y <= 3.4e+237: tmp = (y * x) / z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) * Float64(t / z)) tmp = 0.0 if (y <= -8.5e+95) tmp = t_1; elseif (y <= 6.4e+16) tmp = Float64(Float64(t - x) + x); elseif (y <= 3.4e+237) tmp = Float64(Float64(y * x) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y * (t / z); tmp = 0.0; if (y <= -8.5e+95) tmp = t_1; elseif (y <= 6.4e+16) tmp = (t - x) + x; elseif (y <= 3.4e+237) tmp = (y * x) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e+95], t$95$1, If[LessEqual[y, 6.4e+16], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[y, 3.4e+237], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+16}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+237}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.5000000000000002e95 or 3.4000000000000003e237 < y Initial program 81.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6496.8
Applied rewrites96.8%
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 rewrites52.7%
Taylor expanded in y around -inf
Applied rewrites54.0%
Taylor expanded in x around 0
Applied rewrites41.1%
if -8.5000000000000002e95 < y < 6.4e16Initial program 63.4%
Taylor expanded in z around inf
lower--.f6430.1
Applied rewrites30.1%
if 6.4e16 < y < 3.4000000000000003e237Initial program 77.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.4
Applied rewrites92.4%
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 rewrites41.8%
Taylor expanded in y around -inf
Applied rewrites40.7%
Taylor expanded in x around inf
Applied rewrites32.6%
Final simplification33.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- y) z) t)))
(if (<= y -8.5e+95)
t_1
(if (<= y 6.4e+16)
(+ (- t x) x)
(if (<= y 3.4e+237) (/ (* y x) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-y / z) * t;
double tmp;
if (y <= -8.5e+95) {
tmp = t_1;
} else if (y <= 6.4e+16) {
tmp = (t - x) + x;
} else if (y <= 3.4e+237) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-y / z) * t
if (y <= (-8.5d+95)) then
tmp = t_1
else if (y <= 6.4d+16) then
tmp = (t - x) + x
else if (y <= 3.4d+237) then
tmp = (y * x) / z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (-y / z) * t;
double tmp;
if (y <= -8.5e+95) {
tmp = t_1;
} else if (y <= 6.4e+16) {
tmp = (t - x) + x;
} else if (y <= 3.4e+237) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-y / z) * t tmp = 0 if y <= -8.5e+95: tmp = t_1 elif y <= 6.4e+16: tmp = (t - x) + x elif y <= 3.4e+237: tmp = (y * x) / z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(-y) / z) * t) tmp = 0.0 if (y <= -8.5e+95) tmp = t_1; elseif (y <= 6.4e+16) tmp = Float64(Float64(t - x) + x); elseif (y <= 3.4e+237) tmp = Float64(Float64(y * x) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-y / z) * t; tmp = 0.0; if (y <= -8.5e+95) tmp = t_1; elseif (y <= 6.4e+16) tmp = (t - x) + x; elseif (y <= 3.4e+237) tmp = (y * x) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-y) / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -8.5e+95], t$95$1, If[LessEqual[y, 6.4e+16], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[y, 3.4e+237], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-y}{z} \cdot t\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+16}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+237}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.5000000000000002e95 or 3.4000000000000003e237 < y Initial program 81.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6496.8
Applied rewrites96.8%
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 rewrites52.7%
Taylor expanded in y around -inf
Applied rewrites54.0%
Taylor expanded in x around 0
Applied rewrites41.1%
if -8.5000000000000002e95 < y < 6.4e16Initial program 63.4%
Taylor expanded in z around inf
lower--.f6430.1
Applied rewrites30.1%
if 6.4e16 < y < 3.4000000000000003e237Initial program 77.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.4
Applied rewrites92.4%
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 rewrites41.8%
Taylor expanded in y around -inf
Applied rewrites40.7%
Taylor expanded in x around inf
Applied rewrites32.6%
Final simplification33.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.25e+128) (* (/ z (- z a)) t) (if (<= z 5e+62) (fma (- t x) (/ y a) x) (fma a (/ (- t x) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.25e+128) {
tmp = (z / (z - a)) * t;
} else if (z <= 5e+62) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = fma(a, ((t - x) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.25e+128) tmp = Float64(Float64(z / Float64(z - a)) * t); elseif (z <= 5e+62) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = fma(a, Float64(Float64(t - x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+128], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 5e+62], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+128}:\\
\;\;\;\;\frac{z}{z - a} \cdot t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.25e128Initial program 42.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6472.2
Applied rewrites72.2%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6442.1
Applied rewrites42.1%
Taylor expanded in y around 0
Applied rewrites66.7%
if -1.25e128 < z < 5.00000000000000029e62Initial program 88.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.9
Applied rewrites93.9%
Taylor expanded in z around 0
lower-/.f6469.6
Applied rewrites69.6%
if 5.00000000000000029e62 < z Initial program 35.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6462.9
Applied rewrites62.9%
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 rewrites73.4%
Taylor expanded in y around 0
Applied rewrites67.6%
Final simplification68.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ (- t x) z) t))) (if (<= z -6.2e+127) t_1 (if (<= z 5e+62) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((t - x) / z), t);
double tmp;
if (z <= -6.2e+127) {
tmp = t_1;
} else if (z <= 5e+62) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -6.2e+127) tmp = t_1; elseif (z <= 5e+62) 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[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -6.2e+127], t$95$1, If[LessEqual[z, 5e+62], 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(a, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.2000000000000005e127 or 5.00000000000000029e62 < z Initial program 38.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6466.9
Applied rewrites66.9%
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 rewrites72.6%
Taylor expanded in y around 0
Applied rewrites65.0%
if -6.2000000000000005e127 < z < 5.00000000000000029e62Initial program 88.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.9
Applied rewrites93.9%
Taylor expanded in z around 0
lower-/.f6469.6
Applied rewrites69.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ (- t x) z) t))) (if (<= z -1.12e+124) t_1 (if (<= z 5e+62) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((t - x) / z), t);
double tmp;
if (z <= -1.12e+124) {
tmp = t_1;
} else if (z <= 5e+62) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -1.12e+124) tmp = t_1; elseif (z <= 5e+62) 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[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.12e+124], t$95$1, If[LessEqual[z, 5e+62], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.12000000000000005e124 or 5.00000000000000029e62 < z Initial program 38.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6467.2
Applied rewrites67.2%
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 rewrites71.9%
Taylor expanded in y around 0
Applied rewrites64.4%
if -1.12000000000000005e124 < z < 5.00000000000000029e62Initial program 88.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6468.4
Applied rewrites68.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -1.48e+203) t_1 (if (<= z 8.5e+63) (+ (/ (* t y) a) 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 <= -1.48e+203) {
tmp = t_1;
} else if (z <= 8.5e+63) {
tmp = ((t * y) / a) + 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 <= (-1.48d+203)) then
tmp = t_1
else if (z <= 8.5d+63) then
tmp = ((t * y) / a) + 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 <= -1.48e+203) {
tmp = t_1;
} else if (z <= 8.5e+63) {
tmp = ((t * y) / a) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -1.48e+203: tmp = t_1 elif z <= 8.5e+63: tmp = ((t * y) / a) + 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 <= -1.48e+203) tmp = t_1; elseif (z <= 8.5e+63) tmp = Float64(Float64(Float64(t * y) / a) + 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 <= -1.48e+203) tmp = t_1; elseif (z <= 8.5e+63) tmp = ((t * y) / a) + 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, -1.48e+203], t$95$1, If[LessEqual[z, 8.5e+63], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -1.48 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4799999999999999e203 or 8.5000000000000004e63 < z Initial program 33.9%
Taylor expanded in z around inf
lower--.f6443.7
Applied rewrites43.7%
if -1.4799999999999999e203 < z < 8.5000000000000004e63Initial program 85.6%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6460.3
Applied rewrites60.3%
Taylor expanded in x around 0
Applied rewrites45.6%
Final simplification45.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* (- y a) x) z))) (if (<= x -7.7e-82) t_1 (if (<= x 2.9e+39) (+ (- t x) x) 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 <= -7.7e-82) {
tmp = t_1;
} else if (x <= 2.9e+39) {
tmp = (t - x) + 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 = ((y - a) * x) / z
if (x <= (-7.7d-82)) then
tmp = t_1
else if (x <= 2.9d+39) then
tmp = (t - x) + 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 = ((y - a) * x) / z;
double tmp;
if (x <= -7.7e-82) {
tmp = t_1;
} else if (x <= 2.9e+39) {
tmp = (t - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - a) * x) / z tmp = 0 if x <= -7.7e-82: tmp = t_1 elif x <= 2.9e+39: tmp = (t - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - a) * x) / z) tmp = 0.0 if (x <= -7.7e-82) tmp = t_1; elseif (x <= 2.9e+39) tmp = Float64(Float64(t - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - a) * x) / z; tmp = 0.0; if (x <= -7.7e-82) tmp = t_1; elseif (x <= 2.9e+39) tmp = (t - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[x, -7.7e-82], t$95$1, If[LessEqual[x, 2.9e+39], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - a\right) \cdot x}{z}\\
\mathbf{if}\;x \leq -7.7 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+39}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.69999999999999994e-82 or 2.90000000000000029e39 < x Initial program 63.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6479.4
Applied rewrites79.4%
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 rewrites47.2%
Taylor expanded in x around inf
Applied rewrites34.2%
if -7.69999999999999994e-82 < x < 2.90000000000000029e39Initial program 80.1%
Taylor expanded in z around inf
lower--.f6432.1
Applied rewrites32.1%
Final simplification33.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y x) z))) (if (<= y -1.9e+97) t_1 (if (<= y 6.4e+16) (+ (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * x) / z;
double tmp;
if (y <= -1.9e+97) {
tmp = t_1;
} else if (y <= 6.4e+16) {
tmp = (t - x) + 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 = (y * x) / z
if (y <= (-1.9d+97)) then
tmp = t_1
else if (y <= 6.4d+16) then
tmp = (t - x) + 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 = (y * x) / z;
double tmp;
if (y <= -1.9e+97) {
tmp = t_1;
} else if (y <= 6.4e+16) {
tmp = (t - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * x) / z tmp = 0 if y <= -1.9e+97: tmp = t_1 elif y <= 6.4e+16: tmp = (t - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * x) / z) tmp = 0.0 if (y <= -1.9e+97) tmp = t_1; elseif (y <= 6.4e+16) tmp = Float64(Float64(t - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * x) / z; tmp = 0.0; if (y <= -1.9e+97) tmp = t_1; elseif (y <= 6.4e+16) tmp = (t - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -1.9e+97], t$95$1, If[LessEqual[y, 6.4e+16], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot x}{z}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+16}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.90000000000000018e97 or 6.4e16 < y Initial program 79.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.8
Applied rewrites94.8%
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 rewrites48.0%
Taylor expanded in y around -inf
Applied rewrites48.2%
Taylor expanded in x around inf
Applied rewrites29.8%
if -1.90000000000000018e97 < y < 6.4e16Initial program 63.4%
Taylor expanded in z around inf
lower--.f6430.1
Applied rewrites30.1%
Final simplification30.0%
(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 70.9%
Taylor expanded in z around inf
lower--.f6420.0
Applied rewrites20.0%
Final simplification20.0%
(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(Float64(-x) + 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}
\\
\left(-x\right) + x
\end{array}
Initial program 70.9%
Taylor expanded in z around inf
lower--.f6420.0
Applied rewrites20.0%
Taylor expanded in x around inf
Applied rewrites2.9%
Final simplification2.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 2024298
(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))))