
(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 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -1e+288)
t_1
(if (<= t_2 -2e-275)
t_2
(if (<= t_2 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 2e+290) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -1e+288) {
tmp = t_1;
} else if (t_2 <= -2e-275) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+290) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
t_2 = x + (((y - z) * (t - x)) / (a - z))
if (t_2 <= (-1d+288)) then
tmp = t_1
else if (t_2 <= (-2d-275)) then
tmp = t_2
else if (t_2 <= 0.0d0) then
tmp = t + (((t - x) * (a - y)) / z)
else if (t_2 <= 2d+290) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -1e+288) {
tmp = t_1;
} else if (t_2 <= -2e-275) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+290) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -1e+288: tmp = t_1 elif t_2 <= -2e-275: tmp = t_2 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 2e+290: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -1e+288) tmp = t_1; elseif (t_2 <= -2e-275) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 2e+290) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -1e+288) tmp = t_1; elseif (t_2 <= -2e-275) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 2e+290) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+288], t$95$1, If[LessEqual[t$95$2, -2e-275], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+290], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+288}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e288 or 2.00000000000000012e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 42.8%
associate-/l*81.9%
Simplified81.9%
if -1e288 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999987e-275 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000012e290Initial program 95.5%
if -1.99999999999999987e-275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
+-commutative3.9%
*-commutative3.9%
associate-/l*3.9%
fma-define3.9%
Simplified3.9%
Taylor expanded in z around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
Final simplification90.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -2e-275)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(-
(* a (/ (- t x) z))
(+
(* a (/ (* (- t x) (- y a)) (pow z 2.0)))
(- (/ (* y (- t x)) z) t)))
(if (<= t_1 2e+290) t_1 (fma (- y z) (/ (- t x) (- a z)) x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_1 <= -2e-275) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = (a * ((t - x) / z)) - ((a * (((t - x) * (y - a)) / pow(z, 2.0))) + (((y * (t - x)) / z) - t));
} else if (t_1 <= 2e+290) {
tmp = t_1;
} else {
tmp = fma((y - z), ((t - x) / (a - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -2e-275) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(Float64(a * Float64(Float64(t - x) / z)) - Float64(Float64(a * Float64(Float64(Float64(t - x) * Float64(y - a)) / (z ^ 2.0))) + Float64(Float64(Float64(y * Float64(t - x)) / z) - t))); elseif (t_1 <= 2e+290) tmp = t_1; else tmp = fma(Float64(y - z), Float64(Float64(t - x) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-275], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(N[(a * N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+290], t$95$1, N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;a \cdot \frac{t - x}{z} - \left(a \cdot \frac{\left(t - x\right) \cdot \left(y - a\right)}{{z}^{2}} + \left(\frac{y \cdot \left(t - x\right)}{z} - t\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999987e-275Initial program 74.6%
+-commutative74.6%
*-commutative74.6%
associate-/l*88.2%
fma-define88.2%
Simplified88.2%
if -1.99999999999999987e-275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
+-commutative3.9%
*-commutative3.9%
associate-/l*3.9%
fma-define3.9%
Simplified3.9%
Taylor expanded in z around inf 93.4%
sub-neg93.4%
Simplified99.9%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000012e290Initial program 95.1%
if 2.00000000000000012e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 39.5%
+-commutative39.5%
associate-/l*80.2%
fma-define80.6%
Simplified80.6%
Final simplification89.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -2e-275)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_1 2e+290) t_1 (fma (- y z) (/ (- t x) (- a z)) x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_1 <= -2e-275) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_1 <= 2e+290) {
tmp = t_1;
} else {
tmp = fma((y - z), ((t - x) / (a - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -2e-275) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_1 <= 2e+290) tmp = t_1; else tmp = fma(Float64(y - z), Float64(Float64(t - x) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-275], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+290], t$95$1, N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999987e-275Initial program 74.6%
+-commutative74.6%
*-commutative74.6%
associate-/l*88.2%
fma-define88.2%
Simplified88.2%
if -1.99999999999999987e-275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
+-commutative3.9%
*-commutative3.9%
associate-/l*3.9%
fma-define3.9%
Simplified3.9%
Taylor expanded in z around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000012e290Initial program 95.1%
if 2.00000000000000012e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 39.5%
+-commutative39.5%
associate-/l*80.2%
fma-define80.6%
Simplified80.6%
Final simplification89.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -2e-275)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_1 2e+290) t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_1 <= -2e-275) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_1 <= 2e+290) {
tmp = t_1;
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -2e-275) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_1 <= 2e+290) tmp = t_1; else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-275], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+290], t$95$1, N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999987e-275Initial program 74.6%
+-commutative74.6%
*-commutative74.6%
associate-/l*88.2%
fma-define88.2%
Simplified88.2%
if -1.99999999999999987e-275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
+-commutative3.9%
*-commutative3.9%
associate-/l*3.9%
fma-define3.9%
Simplified3.9%
Taylor expanded in z around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000012e290Initial program 95.1%
if 2.00000000000000012e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 39.5%
associate-/l*80.2%
Simplified80.2%
Final simplification89.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e+170)
t
(if (<= z -4.2e-23)
(* x (+ (/ y z) 1.0))
(if (<= z -2.1e-118)
(* t (/ y (- a z)))
(if (<= z 1550000000.0) (* x (- 1.0 (/ y a))) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+170) {
tmp = t;
} else if (z <= -4.2e-23) {
tmp = x * ((y / z) + 1.0);
} else if (z <= -2.1e-118) {
tmp = t * (y / (a - z));
} else if (z <= 1550000000.0) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
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) :: tmp
if (z <= (-5d+170)) then
tmp = t
else if (z <= (-4.2d-23)) then
tmp = x * ((y / z) + 1.0d0)
else if (z <= (-2.1d-118)) then
tmp = t * (y / (a - z))
else if (z <= 1550000000.0d0) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+170) {
tmp = t;
} else if (z <= -4.2e-23) {
tmp = x * ((y / z) + 1.0);
} else if (z <= -2.1e-118) {
tmp = t * (y / (a - z));
} else if (z <= 1550000000.0) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e+170: tmp = t elif z <= -4.2e-23: tmp = x * ((y / z) + 1.0) elif z <= -2.1e-118: tmp = t * (y / (a - z)) elif z <= 1550000000.0: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+170) tmp = t; elseif (z <= -4.2e-23) tmp = Float64(x * Float64(Float64(y / z) + 1.0)); elseif (z <= -2.1e-118) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1550000000.0) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e+170) tmp = t; elseif (z <= -4.2e-23) tmp = x * ((y / z) + 1.0); elseif (z <= -2.1e-118) tmp = t * (y / (a - z)); elseif (z <= 1550000000.0) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+170], t, If[LessEqual[z, -4.2e-23], N[(x * N[(N[(y / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e-118], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1550000000.0], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+170}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-23}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + 1\right)\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1550000000:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.99999999999999977e170 or 1.55e9 < z Initial program 37.0%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in t around inf 33.1%
associate-/l*61.2%
Simplified61.2%
Taylor expanded in z around inf 47.4%
Taylor expanded in x around 0 57.9%
if -4.99999999999999977e170 < z < -4.2000000000000002e-23Initial program 72.8%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in y around inf 49.2%
associate-*r/58.0%
Simplified58.0%
Taylor expanded in x around inf 48.7%
associate-*r/48.7%
neg-mul-148.7%
Simplified48.7%
Taylor expanded in a around 0 48.7%
*-commutative48.7%
Simplified48.7%
if -4.2000000000000002e-23 < z < -2.1e-118Initial program 88.0%
+-commutative88.0%
*-commutative88.0%
associate-/l*79.9%
fma-define80.0%
Simplified80.0%
Taylor expanded in t around inf 59.9%
Taylor expanded in y around inf 51.6%
if -2.1e-118 < z < 1.55e9Initial program 89.9%
associate-/l*86.8%
Simplified86.8%
Taylor expanded in y around inf 82.1%
associate-*r/80.7%
Simplified80.7%
Taylor expanded in x around inf 58.6%
associate-*r/58.6%
neg-mul-158.6%
Simplified58.6%
Taylor expanded in a around inf 50.9%
*-rgt-identity50.9%
mul-1-neg50.9%
associate-/l*54.1%
distribute-rgt-neg-in54.1%
mul-1-neg54.1%
distribute-lft-in54.1%
*-commutative54.1%
mul-1-neg54.1%
unsub-neg54.1%
Simplified54.1%
Final simplification54.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (+ (/ y z) 1.0))))
(if (<= z -5e+170)
t
(if (<= z -7.2e-23)
t_1
(if (<= z 2.45e-198)
(* t (/ y (- a z)))
(if (<= z 2150000000.0) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y / z) + 1.0);
double tmp;
if (z <= -5e+170) {
tmp = t;
} else if (z <= -7.2e-23) {
tmp = t_1;
} else if (z <= 2.45e-198) {
tmp = t * (y / (a - z));
} else if (z <= 2150000000.0) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((y / z) + 1.0d0)
if (z <= (-5d+170)) then
tmp = t
else if (z <= (-7.2d-23)) then
tmp = t_1
else if (z <= 2.45d-198) then
tmp = t * (y / (a - z))
else if (z <= 2150000000.0d0) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y / z) + 1.0);
double tmp;
if (z <= -5e+170) {
tmp = t;
} else if (z <= -7.2e-23) {
tmp = t_1;
} else if (z <= 2.45e-198) {
tmp = t * (y / (a - z));
} else if (z <= 2150000000.0) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * ((y / z) + 1.0) tmp = 0 if z <= -5e+170: tmp = t elif z <= -7.2e-23: tmp = t_1 elif z <= 2.45e-198: tmp = t * (y / (a - z)) elif z <= 2150000000.0: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(Float64(y / z) + 1.0)) tmp = 0.0 if (z <= -5e+170) tmp = t; elseif (z <= -7.2e-23) tmp = t_1; elseif (z <= 2.45e-198) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 2150000000.0) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * ((y / z) + 1.0); tmp = 0.0; if (z <= -5e+170) tmp = t; elseif (z <= -7.2e-23) tmp = t_1; elseif (z <= 2.45e-198) tmp = t * (y / (a - z)); elseif (z <= 2150000000.0) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+170], t, If[LessEqual[z, -7.2e-23], t$95$1, If[LessEqual[z, 2.45e-198], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2150000000.0], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} + 1\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{+170}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-198}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 2150000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.99999999999999977e170 or 2.15e9 < z Initial program 37.0%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in t around inf 33.1%
associate-/l*61.2%
Simplified61.2%
Taylor expanded in z around inf 47.4%
Taylor expanded in x around 0 57.9%
if -4.99999999999999977e170 < z < -7.1999999999999996e-23 or 2.4500000000000001e-198 < z < 2.15e9Initial program 79.8%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around inf 62.7%
associate-*r/69.1%
Simplified69.1%
Taylor expanded in x around inf 54.1%
associate-*r/54.1%
neg-mul-154.1%
Simplified54.1%
Taylor expanded in a around 0 43.5%
*-commutative43.5%
Simplified43.5%
if -7.1999999999999996e-23 < z < 2.4500000000000001e-198Initial program 91.6%
+-commutative91.6%
*-commutative91.6%
associate-/l*89.4%
fma-define89.5%
Simplified89.5%
Taylor expanded in t around inf 45.4%
Taylor expanded in y around inf 40.0%
Final simplification47.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ (* (- t x) (- a y)) z))))
(if (<= z -6.2e+165)
t_1
(if (<= z -1.75e-113)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 5.2e-87) (+ x (/ (* y (- t x)) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((t - x) * (a - y)) / z);
double tmp;
if (z <= -6.2e+165) {
tmp = t_1;
} else if (z <= -1.75e-113) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (((t - x) * (a - y)) / z)
if (z <= (-6.2d+165)) then
tmp = t_1
else if (z <= (-1.75d-113)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 5.2d-87) then
tmp = x + ((y * (t - x)) / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((t - x) * (a - y)) / z);
double tmp;
if (z <= -6.2e+165) {
tmp = t_1;
} else if (z <= -1.75e-113) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (((t - x) * (a - y)) / z) tmp = 0 if z <= -6.2e+165: tmp = t_1 elif z <= -1.75e-113: tmp = x + ((y - z) * (t / (a - z))) elif z <= 5.2e-87: tmp = x + ((y * (t - x)) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)) tmp = 0.0 if (z <= -6.2e+165) tmp = t_1; elseif (z <= -1.75e-113) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (((t - x) * (a - y)) / z); tmp = 0.0; if (z <= -6.2e+165) tmp = t_1; elseif (z <= -1.75e-113) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 5.2e-87) tmp = x + ((y * (t - x)) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+165], t$95$1, If[LessEqual[z, -1.75e-113], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-113}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.2000000000000003e165 or 5.20000000000000005e-87 < z Initial program 44.9%
+-commutative44.9%
*-commutative44.9%
associate-/l*69.9%
fma-define69.9%
Simplified69.9%
Taylor expanded in z around inf 73.7%
associate--l+73.7%
associate-*r/73.7%
associate-*r/73.7%
mul-1-neg73.7%
div-sub73.7%
mul-1-neg73.7%
distribute-lft-out--73.7%
associate-*r/73.7%
mul-1-neg73.7%
unsub-neg73.7%
distribute-rgt-out--73.7%
Simplified73.7%
if -6.2000000000000003e165 < z < -1.75000000000000014e-113Initial program 78.2%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in t around inf 74.5%
if -1.75000000000000014e-113 < z < 5.20000000000000005e-87Initial program 91.8%
Taylor expanded in y around inf 87.0%
*-commutative87.0%
Simplified87.0%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.3e+128)
(* t (/ z (- z a)))
(if (<= z -4.8e-126)
(+ x (/ y (/ (- a z) t)))
(if (<= z 1.85e-66)
(+ x (/ (* y (- t x)) a))
(- x (* t (/ z (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e+128) {
tmp = t * (z / (z - a));
} else if (z <= -4.8e-126) {
tmp = x + (y / ((a - z) / t));
} else if (z <= 1.85e-66) {
tmp = x + ((y * (t - x)) / a);
} else {
tmp = x - (t * (z / (a - z)));
}
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) :: tmp
if (z <= (-1.3d+128)) then
tmp = t * (z / (z - a))
else if (z <= (-4.8d-126)) then
tmp = x + (y / ((a - z) / t))
else if (z <= 1.85d-66) then
tmp = x + ((y * (t - x)) / a)
else
tmp = x - (t * (z / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e+128) {
tmp = t * (z / (z - a));
} else if (z <= -4.8e-126) {
tmp = x + (y / ((a - z) / t));
} else if (z <= 1.85e-66) {
tmp = x + ((y * (t - x)) / a);
} else {
tmp = x - (t * (z / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e+128: tmp = t * (z / (z - a)) elif z <= -4.8e-126: tmp = x + (y / ((a - z) / t)) elif z <= 1.85e-66: tmp = x + ((y * (t - x)) / a) else: tmp = x - (t * (z / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e+128) tmp = Float64(t * Float64(z / Float64(z - a))); elseif (z <= -4.8e-126) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); elseif (z <= 1.85e-66) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); else tmp = Float64(x - Float64(t * Float64(z / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.3e+128) tmp = t * (z / (z - a)); elseif (z <= -4.8e-126) tmp = x + (y / ((a - z) / t)); elseif (z <= 1.85e-66) tmp = x + ((y * (t - x)) / a); else tmp = x - (t * (z / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+128], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-126], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-66], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+128}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-126}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-66}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\
\end{array}
\end{array}
if z < -1.3e128Initial program 29.9%
+-commutative29.9%
*-commutative29.9%
associate-/l*63.0%
fma-define63.0%
Simplified63.0%
Taylor expanded in t around inf 68.7%
Taylor expanded in y around 0 66.3%
neg-mul-166.3%
distribute-neg-frac66.3%
Simplified66.3%
if -1.3e128 < z < -4.80000000000000014e-126Initial program 85.8%
associate-/l*90.0%
Simplified90.0%
clear-num89.9%
un-div-inv89.8%
Applied egg-rr89.8%
Taylor expanded in t around inf 80.0%
Taylor expanded in y around inf 60.0%
if -4.80000000000000014e-126 < z < 1.8500000000000001e-66Initial program 91.8%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in z around 0 75.9%
if 1.8500000000000001e-66 < z Initial program 48.0%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in t around inf 41.2%
associate-/l*63.7%
Simplified63.7%
Taylor expanded in y around 0 33.5%
mul-1-neg33.5%
unsub-neg33.5%
associate-/l*54.8%
Simplified54.8%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3e+127)
(* t (/ z (- z a)))
(if (<= z -1.8e-118)
(+ x (/ y (/ (- a z) t)))
(if (<= z 5.2e-87) (+ x (/ (* y (- t x)) a)) (* t (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+127) {
tmp = t * (z / (z - a));
} else if (z <= -1.8e-118) {
tmp = x + (y / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / a);
} else {
tmp = t * (1.0 - (y / z));
}
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) :: tmp
if (z <= (-3d+127)) then
tmp = t * (z / (z - a))
else if (z <= (-1.8d-118)) then
tmp = x + (y / ((a - z) / t))
else if (z <= 5.2d-87) then
tmp = x + ((y * (t - x)) / a)
else
tmp = t * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+127) {
tmp = t * (z / (z - a));
} else if (z <= -1.8e-118) {
tmp = x + (y / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / a);
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e+127: tmp = t * (z / (z - a)) elif z <= -1.8e-118: tmp = x + (y / ((a - z) / t)) elif z <= 5.2e-87: tmp = x + ((y * (t - x)) / a) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+127) tmp = Float64(t * Float64(z / Float64(z - a))); elseif (z <= -1.8e-118) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e+127) tmp = t * (z / (z - a)); elseif (z <= -1.8e-118) tmp = x + (y / ((a - z) / t)); elseif (z <= 5.2e-87) tmp = x + ((y * (t - x)) / a); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+127], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.8e-118], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+127}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-118}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -3.0000000000000002e127Initial program 29.9%
+-commutative29.9%
*-commutative29.9%
associate-/l*63.0%
fma-define63.0%
Simplified63.0%
Taylor expanded in t around inf 68.7%
Taylor expanded in y around 0 66.3%
neg-mul-166.3%
distribute-neg-frac66.3%
Simplified66.3%
if -3.0000000000000002e127 < z < -1.8000000000000001e-118Initial program 85.8%
associate-/l*90.0%
Simplified90.0%
clear-num89.9%
un-div-inv89.8%
Applied egg-rr89.8%
Taylor expanded in t around inf 80.0%
Taylor expanded in y around inf 60.0%
if -1.8000000000000001e-118 < z < 5.20000000000000005e-87Initial program 91.6%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in z around 0 77.3%
if 5.20000000000000005e-87 < z Initial program 49.9%
+-commutative49.9%
*-commutative49.9%
associate-/l*74.1%
fma-define74.1%
Simplified74.1%
Taylor expanded in t around inf 61.0%
Taylor expanded in a around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
Final simplification64.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.6e+127)
(* t (/ z (- z a)))
(if (<= z -3.6e-118)
(+ x (/ y (/ (- a z) t)))
(if (<= z 5.2e-87) (+ x (* y (/ (- t x) a))) (* t (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+127) {
tmp = t * (z / (z - a));
} else if (z <= -3.6e-118) {
tmp = x + (y / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * (1.0 - (y / z));
}
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) :: tmp
if (z <= (-2.6d+127)) then
tmp = t * (z / (z - a))
else if (z <= (-3.6d-118)) then
tmp = x + (y / ((a - z) / t))
else if (z <= 5.2d-87) then
tmp = x + (y * ((t - x) / a))
else
tmp = t * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+127) {
tmp = t * (z / (z - a));
} else if (z <= -3.6e-118) {
tmp = x + (y / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+127: tmp = t * (z / (z - a)) elif z <= -3.6e-118: tmp = x + (y / ((a - z) / t)) elif z <= 5.2e-87: tmp = x + (y * ((t - x) / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+127) tmp = Float64(t * Float64(z / Float64(z - a))); elseif (z <= -3.6e-118) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+127) tmp = t * (z / (z - a)); elseif (z <= -3.6e-118) tmp = x + (y / ((a - z) / t)); elseif (z <= 5.2e-87) tmp = x + (y * ((t - x) / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+127], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-118], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+127}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-118}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -2.6000000000000002e127Initial program 29.9%
+-commutative29.9%
*-commutative29.9%
associate-/l*63.0%
fma-define63.0%
Simplified63.0%
Taylor expanded in t around inf 68.7%
Taylor expanded in y around 0 66.3%
neg-mul-166.3%
distribute-neg-frac66.3%
Simplified66.3%
if -2.6000000000000002e127 < z < -3.6000000000000002e-118Initial program 85.8%
associate-/l*90.0%
Simplified90.0%
clear-num89.9%
un-div-inv89.8%
Applied egg-rr89.8%
Taylor expanded in t around inf 80.0%
Taylor expanded in y around inf 60.0%
if -3.6000000000000002e-118 < z < 5.20000000000000005e-87Initial program 91.6%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in z around 0 77.3%
associate-/l*76.7%
Simplified76.7%
if 5.20000000000000005e-87 < z Initial program 49.9%
+-commutative49.9%
*-commutative49.9%
associate-/l*74.1%
fma-define74.1%
Simplified74.1%
Taylor expanded in t around inf 61.0%
Taylor expanded in a around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.8e+127)
(* t (/ z (- z a)))
(if (<= z -3.5e-124)
(+ x (* y (/ t (- a z))))
(if (<= z 5.2e-87) (+ x (* y (/ (- t x) a))) (* t (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+127) {
tmp = t * (z / (z - a));
} else if (z <= -3.5e-124) {
tmp = x + (y * (t / (a - z)));
} else if (z <= 5.2e-87) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * (1.0 - (y / z));
}
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) :: tmp
if (z <= (-1.8d+127)) then
tmp = t * (z / (z - a))
else if (z <= (-3.5d-124)) then
tmp = x + (y * (t / (a - z)))
else if (z <= 5.2d-87) then
tmp = x + (y * ((t - x) / a))
else
tmp = t * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+127) {
tmp = t * (z / (z - a));
} else if (z <= -3.5e-124) {
tmp = x + (y * (t / (a - z)));
} else if (z <= 5.2e-87) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+127: tmp = t * (z / (z - a)) elif z <= -3.5e-124: tmp = x + (y * (t / (a - z))) elif z <= 5.2e-87: tmp = x + (y * ((t - x) / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+127) tmp = Float64(t * Float64(z / Float64(z - a))); elseif (z <= -3.5e-124) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+127) tmp = t * (z / (z - a)); elseif (z <= -3.5e-124) tmp = x + (y * (t / (a - z))); elseif (z <= 5.2e-87) tmp = x + (y * ((t - x) / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+127], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-124], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-124}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.79999999999999989e127Initial program 29.9%
+-commutative29.9%
*-commutative29.9%
associate-/l*63.0%
fma-define63.0%
Simplified63.0%
Taylor expanded in t around inf 68.7%
Taylor expanded in y around 0 66.3%
neg-mul-166.3%
distribute-neg-frac66.3%
Simplified66.3%
if -1.79999999999999989e127 < z < -3.4999999999999999e-124Initial program 85.8%
Taylor expanded in t around inf 76.0%
Taylor expanded in y around inf 56.0%
Taylor expanded in y around 0 56.0%
*-commutative56.0%
associate-*r/59.9%
Simplified59.9%
if -3.4999999999999999e-124 < z < 5.20000000000000005e-87Initial program 91.6%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in z around 0 77.3%
associate-/l*76.7%
Simplified76.7%
if 5.20000000000000005e-87 < z Initial program 49.9%
+-commutative49.9%
*-commutative49.9%
associate-/l*74.1%
fma-define74.1%
Simplified74.1%
Taylor expanded in t around inf 61.0%
Taylor expanded in a around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
Final simplification64.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-162) (not (<= a 5.1e-144))) (+ x (* (- y z) (/ (- t x) (- a z)))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-162) || !(a <= 5.1e-144)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
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) :: tmp
if ((a <= (-3d-162)) .or. (.not. (a <= 5.1d-144))) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-162) || !(a <= 5.1e-144)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-162) or not (a <= 5.1e-144): tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-162) || !(a <= 5.1e-144)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-162) || ~((a <= 5.1e-144))) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-162], N[Not[LessEqual[a, 5.1e-144]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-162} \lor \neg \left(a \leq 5.1 \cdot 10^{-144}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -2.99999999999999999e-162 or 5.1e-144 < a Initial program 69.4%
associate-/l*81.7%
Simplified81.7%
if -2.99999999999999999e-162 < a < 5.1e-144Initial program 66.9%
+-commutative66.9%
*-commutative66.9%
associate-/l*79.6%
fma-define79.6%
Simplified79.6%
Taylor expanded in z around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
associate-*r/88.5%
mul-1-neg88.5%
div-sub90.2%
mul-1-neg90.2%
distribute-lft-out--90.2%
associate-*r/90.2%
mul-1-neg90.2%
unsub-neg90.2%
distribute-rgt-out--90.2%
Simplified90.2%
Final simplification83.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.4e+94) (not (<= y 2.45e+27))) (+ x (* y (/ (- t x) (- a z)))) (- x (* t (/ (- y z) (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.4e+94) || !(y <= 2.45e+27)) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x - (t * ((y - z) / (z - a)));
}
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) :: tmp
if ((y <= (-2.4d+94)) .or. (.not. (y <= 2.45d+27))) then
tmp = x + (y * ((t - x) / (a - z)))
else
tmp = x - (t * ((y - z) / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.4e+94) || !(y <= 2.45e+27)) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x - (t * ((y - z) / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.4e+94) or not (y <= 2.45e+27): tmp = x + (y * ((t - x) / (a - z))) else: tmp = x - (t * ((y - z) / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.4e+94) || !(y <= 2.45e+27)) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(x - Float64(t * Float64(Float64(y - z) / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.4e+94) || ~((y <= 2.45e+27))) tmp = x + (y * ((t - x) / (a - z))); else tmp = x - (t * ((y - z) / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.4e+94], N[Not[LessEqual[y, 2.45e+27]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+94} \lor \neg \left(y \leq 2.45 \cdot 10^{+27}\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{y - z}{z - a}\\
\end{array}
\end{array}
if y < -2.39999999999999983e94 or 2.45000000000000007e27 < y Initial program 74.6%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in y around inf 71.9%
associate-*r/81.6%
Simplified81.6%
if -2.39999999999999983e94 < y < 2.45000000000000007e27Initial program 65.6%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in t around inf 61.3%
associate-/l*72.7%
Simplified72.7%
Final simplification75.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y z) (- z a))))
(if (or (<= t -6.6e-102) (not (<= t 4.2e-59)))
(- x (* t t_1))
(* x (+ t_1 1.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (z - a);
double tmp;
if ((t <= -6.6e-102) || !(t <= 4.2e-59)) {
tmp = x - (t * t_1);
} else {
tmp = x * (t_1 + 1.0);
}
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) / (z - a)
if ((t <= (-6.6d-102)) .or. (.not. (t <= 4.2d-59))) then
tmp = x - (t * t_1)
else
tmp = x * (t_1 + 1.0d0)
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) / (z - a);
double tmp;
if ((t <= -6.6e-102) || !(t <= 4.2e-59)) {
tmp = x - (t * t_1);
} else {
tmp = x * (t_1 + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) / (z - a) tmp = 0 if (t <= -6.6e-102) or not (t <= 4.2e-59): tmp = x - (t * t_1) else: tmp = x * (t_1 + 1.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) / Float64(z - a)) tmp = 0.0 if ((t <= -6.6e-102) || !(t <= 4.2e-59)) tmp = Float64(x - Float64(t * t_1)); else tmp = Float64(x * Float64(t_1 + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - z) / (z - a); tmp = 0.0; if ((t <= -6.6e-102) || ~((t <= 4.2e-59))) tmp = x - (t * t_1); else tmp = x * (t_1 + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -6.6e-102], N[Not[LessEqual[t, 4.2e-59]], $MachinePrecision]], N[(x - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{z - a}\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{-102} \lor \neg \left(t \leq 4.2 \cdot 10^{-59}\right):\\
\;\;\;\;x - t \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t\_1 + 1\right)\\
\end{array}
\end{array}
if t < -6.6e-102 or 4.19999999999999993e-59 < t Initial program 69.6%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in t around inf 64.5%
associate-/l*82.3%
Simplified82.3%
if -6.6e-102 < t < 4.19999999999999993e-59Initial program 67.3%
+-commutative67.3%
*-commutative67.3%
associate-/l*67.4%
fma-define67.4%
Simplified67.4%
Taylor expanded in t around 0 55.3%
*-rgt-identity55.3%
mul-1-neg55.3%
associate-/l*57.0%
distribute-rgt-neg-in57.0%
mul-1-neg57.0%
distribute-lft-in57.0%
mul-1-neg57.0%
unsub-neg57.0%
Simplified57.0%
Final simplification73.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.4e-39) (not (<= a 1.45))) (+ x (* t (/ (- y z) a))) (* t (- 1.0 (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.4e-39) || !(a <= 1.45)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t * (1.0 - (y / z));
}
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) :: tmp
if ((a <= (-8.4d-39)) .or. (.not. (a <= 1.45d0))) then
tmp = x + (t * ((y - z) / a))
else
tmp = t * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.4e-39) || !(a <= 1.45)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.4e-39) or not (a <= 1.45): tmp = x + (t * ((y - z) / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.4e-39) || !(a <= 1.45)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.4e-39) || ~((a <= 1.45))) tmp = x + (t * ((y - z) / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.4e-39], N[Not[LessEqual[a, 1.45]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.4 \cdot 10^{-39} \lor \neg \left(a \leq 1.45\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if a < -8.39999999999999973e-39 or 1.44999999999999996 < a Initial program 69.0%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in t around inf 64.3%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in a around inf 60.0%
associate-/l*65.2%
Simplified65.2%
if -8.39999999999999973e-39 < a < 1.44999999999999996Initial program 68.6%
+-commutative68.6%
*-commutative68.6%
associate-/l*77.7%
fma-define77.8%
Simplified77.8%
Taylor expanded in t around inf 62.0%
Taylor expanded in a around 0 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
Final simplification60.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.6e-35) (not (<= a 0.00365))) (+ x (* t (/ y a))) (* t (- 1.0 (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.6e-35) || !(a <= 0.00365)) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (y / z));
}
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) :: tmp
if ((a <= (-1.6d-35)) .or. (.not. (a <= 0.00365d0))) then
tmp = x + (t * (y / a))
else
tmp = t * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.6e-35) || !(a <= 0.00365)) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.6e-35) or not (a <= 0.00365): tmp = x + (t * (y / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.6e-35) || !(a <= 0.00365)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.6e-35) || ~((a <= 0.00365))) tmp = x + (t * (y / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.6e-35], N[Not[LessEqual[a, 0.00365]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-35} \lor \neg \left(a \leq 0.00365\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if a < -1.5999999999999999e-35 or 0.00365000000000000003 < a Initial program 69.0%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in t around inf 64.3%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in z around 0 52.6%
associate-/l*55.8%
Simplified55.8%
if -1.5999999999999999e-35 < a < 0.00365000000000000003Initial program 68.6%
+-commutative68.6%
*-commutative68.6%
associate-/l*77.7%
fma-define77.8%
Simplified77.8%
Taylor expanded in t around inf 62.0%
Taylor expanded in a around 0 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.3e+15) (not (<= y 1.8e+118))) (* t (/ y (- a z))) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.3e+15) || !(y <= 1.8e+118)) {
tmp = t * (y / (a - z));
} else {
tmp = x + t;
}
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) :: tmp
if ((y <= (-1.3d+15)) .or. (.not. (y <= 1.8d+118))) then
tmp = t * (y / (a - z))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.3e+15) || !(y <= 1.8e+118)) {
tmp = t * (y / (a - z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.3e+15) or not (y <= 1.8e+118): tmp = t * (y / (a - z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.3e+15) || !(y <= 1.8e+118)) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.3e+15) || ~((y <= 1.8e+118))) tmp = t * (y / (a - z)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.3e+15], N[Not[LessEqual[y, 1.8e+118]], $MachinePrecision]], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+15} \lor \neg \left(y \leq 1.8 \cdot 10^{+118}\right):\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.3e15 or 1.8e118 < y Initial program 74.2%
+-commutative74.2%
*-commutative74.2%
associate-/l*87.4%
fma-define87.4%
Simplified87.4%
Taylor expanded in t around inf 54.9%
Taylor expanded in y around inf 44.3%
if -1.3e15 < y < 1.8e118Initial program 65.8%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in t around inf 60.9%
associate-/l*71.3%
Simplified71.3%
Taylor expanded in z around inf 43.5%
Final simplification43.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.8e+127) t (if (<= z 2700000000.0) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+127) {
tmp = t;
} else if (z <= 2700000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
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) :: tmp
if (z <= (-1.8d+127)) then
tmp = t
else if (z <= 2700000000.0d0) then
tmp = x + (t * (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+127) {
tmp = t;
} else if (z <= 2700000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+127: tmp = t elif z <= 2700000000.0: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+127) tmp = t; elseif (z <= 2700000000.0) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+127) tmp = t; elseif (z <= 2700000000.0) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+127], t, If[LessEqual[z, 2700000000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2700000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.79999999999999989e127 or 2.7e9 < z Initial program 37.3%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in t around inf 32.6%
associate-/l*59.3%
Simplified59.3%
Taylor expanded in z around inf 44.8%
Taylor expanded in x around 0 54.5%
if -1.79999999999999989e127 < z < 2.7e9Initial program 88.6%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in t around inf 68.5%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in z around 0 46.8%
associate-/l*51.5%
Simplified51.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.8e+72) (not (<= y 3.4e+154))) (* t (/ y a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.8e+72) || !(y <= 3.4e+154)) {
tmp = t * (y / a);
} else {
tmp = x + t;
}
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) :: tmp
if ((y <= (-4.8d+72)) .or. (.not. (y <= 3.4d+154))) then
tmp = t * (y / a)
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.8e+72) || !(y <= 3.4e+154)) {
tmp = t * (y / a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.8e+72) or not (y <= 3.4e+154): tmp = t * (y / a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.8e+72) || !(y <= 3.4e+154)) tmp = Float64(t * Float64(y / a)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.8e+72) || ~((y <= 3.4e+154))) tmp = t * (y / a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.8e+72], N[Not[LessEqual[y, 3.4e+154]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+72} \lor \neg \left(y \leq 3.4 \cdot 10^{+154}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -4.8000000000000002e72 or 3.39999999999999974e154 < y Initial program 76.0%
+-commutative76.0%
*-commutative76.0%
associate-/l*88.4%
fma-define88.4%
Simplified88.4%
Taylor expanded in t around inf 53.4%
Taylor expanded in z around 0 35.3%
if -4.8000000000000002e72 < y < 3.39999999999999974e154Initial program 65.8%
associate-/l*73.8%
Simplified73.8%
Taylor expanded in t around inf 59.3%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in z around inf 41.3%
Final simplification39.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.8e+127) t (if (<= z 8.5e-14) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+127) {
tmp = t;
} else if (z <= 8.5e-14) {
tmp = x;
} else {
tmp = t;
}
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) :: tmp
if (z <= (-1.8d+127)) then
tmp = t
else if (z <= 8.5d-14) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+127) {
tmp = t;
} else if (z <= 8.5e-14) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+127: tmp = t elif z <= 8.5e-14: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+127) tmp = t; elseif (z <= 8.5e-14) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+127) tmp = t; elseif (z <= 8.5e-14) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+127], t, If[LessEqual[z, 8.5e-14], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.79999999999999989e127 or 8.50000000000000038e-14 < z Initial program 39.4%
associate-/l*65.8%
Simplified65.8%
Taylor expanded in t around inf 33.2%
associate-/l*58.6%
Simplified58.6%
Taylor expanded in z around inf 43.8%
Taylor expanded in x around 0 52.9%
if -1.79999999999999989e127 < z < 8.50000000000000038e-14Initial program 88.9%
+-commutative88.9%
*-commutative88.9%
associate-/l*89.5%
fma-define89.5%
Simplified89.5%
Taylor expanded in a around inf 29.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 68.8%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in t around inf 54.6%
associate-/l*66.0%
Simplified66.0%
Taylor expanded in z around inf 32.5%
Taylor expanded in x around 0 26.0%
(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 2024180
(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))))