
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -4e+279)
(+ x (* (- y z) (/ (- t x) (- a z))))
(if (<= t_1 -1e-216)
t_1
(if (<= t_1 0.0)
(- t (/ (* (- t x) (- y a)) z))
(if (<= t_1 2e+279) t_1 (+ x (/ (- y z) (/ (- a z) (- t 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 <= -4e+279) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if (t_1 <= -1e-216) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_1 <= 2e+279) {
tmp = t_1;
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
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) * (t - x)) / (a - z))
if (t_1 <= (-4d+279)) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else if (t_1 <= (-1d-216)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = t - (((t - x) * (y - a)) / z)
else if (t_1 <= 2d+279) then
tmp = t_1
else
tmp = x + ((y - z) / ((a - z) / (t - x)))
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 tmp;
if (t_1 <= -4e+279) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if (t_1 <= -1e-216) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_1 <= 2e+279) {
tmp = t_1;
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_1 <= -4e+279: tmp = x + ((y - z) * ((t - x) / (a - z))) elif t_1 <= -1e-216: tmp = t_1 elif t_1 <= 0.0: tmp = t - (((t - x) * (y - a)) / z) elif t_1 <= 2e+279: tmp = t_1 else: tmp = x + ((y - z) / ((a - z) / (t - 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 <= -4e+279) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); elseif (t_1 <= -1e-216) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); elseif (t_1 <= 2e+279) tmp = t_1; else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_1 <= -4e+279) tmp = x + ((y - z) * ((t - x) / (a - z))); elseif (t_1 <= -1e-216) tmp = t_1; elseif (t_1 <= 0.0) tmp = t - (((t - x) * (y - a)) / z); elseif (t_1 <= 2e+279) tmp = t_1; else tmp = x + ((y - z) / ((a - z) / (t - x))); end tmp_2 = 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, -4e+279], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-216], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+279], t$95$1, N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $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 -4 \cdot 10^{+279}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+279}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.00000000000000023e279Initial program 38.7%
associate-/l*83.3%
Simplified83.3%
if -4.00000000000000023e279 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-216 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000012e279Initial program 97.8%
if -1e-216 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.7%
associate-/l*4.6%
Simplified4.6%
Taylor expanded in z around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
associate-*r/100.0%
mul-1-neg100.0%
div-sub100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
associate-*r/100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
if 2.00000000000000012e279 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 36.9%
associate-/l*77.8%
Simplified77.8%
clear-num77.9%
un-div-inv78.1%
Applied egg-rr78.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -1e-216)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(- t (/ (* (- t x) (- y a)) z))
(+ x (/ -1.0 (/ (/ (- a z) (- y z)) (- x t))))))))
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 <= -1e-216) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
}
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 <= -1e-216) 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(y - a)) / z)); else tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(y - z)) / Float64(x - t)))); 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, -1e-216], 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[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(x - t), $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 -1 \cdot 10^{-216}:\\
\;\;\;\;\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(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y - z}}{x - t}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-216Initial program 71.4%
+-commutative71.4%
*-commutative71.4%
associate-/l*91.3%
fma-define91.3%
Simplified91.3%
if -1e-216 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.7%
associate-/l*4.6%
Simplified4.6%
Taylor expanded in z around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
associate-*r/100.0%
mul-1-neg100.0%
div-sub100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
associate-*r/100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 68.3%
associate-/l*84.3%
Simplified84.3%
associate-*r/68.3%
clear-num68.3%
associate-/r*87.6%
Applied egg-rr87.6%
Final simplification90.1%
(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 -4e+279)
t_1
(if (<= t_2 -1e-216)
t_2
(if (<= t_2 0.0)
(- t (/ (* (- t x) (- y a)) z))
(if (<= t_2 2e+279) 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 <= -4e+279) {
tmp = t_1;
} else if (t_2 <= -1e-216) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_2 <= 2e+279) {
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 <= (-4d+279)) then
tmp = t_1
else if (t_2 <= (-1d-216)) then
tmp = t_2
else if (t_2 <= 0.0d0) then
tmp = t - (((t - x) * (y - a)) / z)
else if (t_2 <= 2d+279) 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 <= -4e+279) {
tmp = t_1;
} else if (t_2 <= -1e-216) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_2 <= 2e+279) {
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 <= -4e+279: tmp = t_1 elif t_2 <= -1e-216: tmp = t_2 elif t_2 <= 0.0: tmp = t - (((t - x) * (y - a)) / z) elif t_2 <= 2e+279: 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 <= -4e+279) tmp = t_1; elseif (t_2 <= -1e-216) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); elseif (t_2 <= 2e+279) 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 <= -4e+279) tmp = t_1; elseif (t_2 <= -1e-216) tmp = t_2; elseif (t_2 <= 0.0) tmp = t - (((t - x) * (y - a)) / z); elseif (t_2 <= 2e+279) 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, -4e+279], t$95$1, If[LessEqual[t$95$2, -1e-216], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+279], 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 -4 \cdot 10^{+279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-216}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+279}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.00000000000000023e279 or 2.00000000000000012e279 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 37.8%
associate-/l*80.6%
Simplified80.6%
if -4.00000000000000023e279 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-216 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000012e279Initial program 97.8%
if -1e-216 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.7%
associate-/l*4.6%
Simplified4.6%
Taylor expanded in z around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
associate-*r/100.0%
mul-1-neg100.0%
div-sub100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
associate-*r/100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-216) (not (<= t_1 0.0)))
(+ x (/ -1.0 (/ (/ (- a z) (- y z)) (- x t))))
(- t (/ (* (- t x) (- y 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 <= -1e-216) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
} else {
tmp = t - (((t - x) * (y - 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) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-1d-216)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((-1.0d0) / (((a - z) / (y - z)) / (x - t)))
else
tmp = t - (((t - x) * (y - a)) / z)
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 tmp;
if ((t_1 <= -1e-216) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -1e-216) or not (t_1 <= 0.0): tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))) else: tmp = t - (((t - x) * (y - 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 <= -1e-216) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(y - z)) / Float64(x - t)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if ((t_1 <= -1e-216) || ~((t_1 <= 0.0))) tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = 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[Or[LessEqual[t$95$1, -1e-216], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $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 -1 \cdot 10^{-216} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y - z}}{x - t}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-216 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 69.9%
associate-/l*85.3%
Simplified85.3%
associate-*r/69.9%
clear-num69.9%
associate-/r*89.5%
Applied egg-rr89.5%
if -1e-216 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.7%
associate-/l*4.6%
Simplified4.6%
Taylor expanded in z around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
associate-*r/100.0%
mul-1-neg100.0%
div-sub100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
associate-*r/100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a))))
(t_2 (* t (/ (- y z) (- a z))))
(t_3 (* y (/ (- t x) (- a z)))))
(if (<= z -720000000.0)
t_2
(if (<= z -3.7e-64)
t_1
(if (<= z -1.9e-119)
t_3
(if (<= z 4.2e-46)
t_1
(if (<= z 1.7e-13)
t_3
(if (<= z 7e+27) (+ x (* t (/ y a))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double t_2 = t * ((y - z) / (a - z));
double t_3 = y * ((t - x) / (a - z));
double tmp;
if (z <= -720000000.0) {
tmp = t_2;
} else if (z <= -3.7e-64) {
tmp = t_1;
} else if (z <= -1.9e-119) {
tmp = t_3;
} else if (z <= 4.2e-46) {
tmp = t_1;
} else if (z <= 1.7e-13) {
tmp = t_3;
} else if (z <= 7e+27) {
tmp = x + (t * (y / a));
} 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) :: t_3
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
t_2 = t * ((y - z) / (a - z))
t_3 = y * ((t - x) / (a - z))
if (z <= (-720000000.0d0)) then
tmp = t_2
else if (z <= (-3.7d-64)) then
tmp = t_1
else if (z <= (-1.9d-119)) then
tmp = t_3
else if (z <= 4.2d-46) then
tmp = t_1
else if (z <= 1.7d-13) then
tmp = t_3
else if (z <= 7d+27) then
tmp = x + (t * (y / a))
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 = x * (1.0 - (y / a));
double t_2 = t * ((y - z) / (a - z));
double t_3 = y * ((t - x) / (a - z));
double tmp;
if (z <= -720000000.0) {
tmp = t_2;
} else if (z <= -3.7e-64) {
tmp = t_1;
} else if (z <= -1.9e-119) {
tmp = t_3;
} else if (z <= 4.2e-46) {
tmp = t_1;
} else if (z <= 1.7e-13) {
tmp = t_3;
} else if (z <= 7e+27) {
tmp = x + (t * (y / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) t_2 = t * ((y - z) / (a - z)) t_3 = y * ((t - x) / (a - z)) tmp = 0 if z <= -720000000.0: tmp = t_2 elif z <= -3.7e-64: tmp = t_1 elif z <= -1.9e-119: tmp = t_3 elif z <= 4.2e-46: tmp = t_1 elif z <= 1.7e-13: tmp = t_3 elif z <= 7e+27: tmp = x + (t * (y / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_3 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (z <= -720000000.0) tmp = t_2; elseif (z <= -3.7e-64) tmp = t_1; elseif (z <= -1.9e-119) tmp = t_3; elseif (z <= 4.2e-46) tmp = t_1; elseif (z <= 1.7e-13) tmp = t_3; elseif (z <= 7e+27) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); t_2 = t * ((y - z) / (a - z)); t_3 = y * ((t - x) / (a - z)); tmp = 0.0; if (z <= -720000000.0) tmp = t_2; elseif (z <= -3.7e-64) tmp = t_1; elseif (z <= -1.9e-119) tmp = t_3; elseif (z <= 4.2e-46) tmp = t_1; elseif (z <= 1.7e-13) tmp = t_3; elseif (z <= 7e+27) tmp = x + (t * (y / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -720000000.0], t$95$2, If[LessEqual[z, -3.7e-64], t$95$1, If[LessEqual[z, -1.9e-119], t$95$3, If[LessEqual[z, 4.2e-46], t$95$1, If[LessEqual[z, 1.7e-13], t$95$3, If[LessEqual[z, 7e+27], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
t_2 := t \cdot \frac{y - z}{a - z}\\
t_3 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;z \leq -720000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-119}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-13}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+27}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.2e8 or 7.0000000000000004e27 < z Initial program 43.4%
associate-/l*67.5%
Simplified67.5%
Taylor expanded in x around 0 39.8%
associate-/l*65.1%
Simplified65.1%
if -7.2e8 < z < -3.69999999999999999e-64 or -1.89999999999999987e-119 < z < 4.19999999999999975e-46Initial program 89.8%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around 0 75.6%
Taylor expanded in x around inf 70.5%
mul-1-neg70.5%
unsub-neg70.5%
Simplified70.5%
if -3.69999999999999999e-64 < z < -1.89999999999999987e-119 or 4.19999999999999975e-46 < z < 1.70000000000000008e-13Initial program 83.8%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around inf 79.7%
div-sub79.7%
Simplified79.7%
if 1.70000000000000008e-13 < z < 7.0000000000000004e27Initial program 68.0%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in z around 0 68.2%
Taylor expanded in t around inf 68.8%
associate-/l*84.6%
Simplified84.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.1e+112)
(* t (/ (- y z) (- a z)))
(if (<= z -9.5e+35)
(- t (/ (* (- t x) (- y a)) z))
(if (<= z 7.5e-37)
(+ x (* (- t x) (/ (- y z) a)))
(- t (* y (/ (- t x) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+112) {
tmp = t * ((y - z) / (a - z));
} else if (z <= -9.5e+35) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (z <= 7.5e-37) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t - (y * ((t - x) / 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 <= (-3.1d+112)) then
tmp = t * ((y - z) / (a - z))
else if (z <= (-9.5d+35)) then
tmp = t - (((t - x) * (y - a)) / z)
else if (z <= 7.5d-37) then
tmp = x + ((t - x) * ((y - z) / a))
else
tmp = t - (y * ((t - x) / 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 <= -3.1e+112) {
tmp = t * ((y - z) / (a - z));
} else if (z <= -9.5e+35) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (z <= 7.5e-37) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t - (y * ((t - x) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.1e+112: tmp = t * ((y - z) / (a - z)) elif z <= -9.5e+35: tmp = t - (((t - x) * (y - a)) / z) elif z <= 7.5e-37: tmp = x + ((t - x) * ((y - z) / a)) else: tmp = t - (y * ((t - x) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.1e+112) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= -9.5e+35) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); elseif (z <= 7.5e-37) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); else tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.1e+112) tmp = t * ((y - z) / (a - z)); elseif (z <= -9.5e+35) tmp = t - (((t - x) * (y - a)) / z); elseif (z <= 7.5e-37) tmp = x + ((t - x) * ((y - z) / a)); else tmp = t - (y * ((t - x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+112], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e+35], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-37], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+112}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+35}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-37}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if z < -3.09999999999999983e112Initial program 35.0%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in x around 0 46.8%
associate-/l*86.4%
Simplified86.4%
if -3.09999999999999983e112 < z < -9.50000000000000062e35Initial program 58.1%
associate-/l*63.9%
Simplified63.9%
Taylor expanded in z around inf 81.9%
associate--l+81.9%
associate-*r/81.9%
associate-*r/81.9%
mul-1-neg81.9%
div-sub81.9%
mul-1-neg81.9%
distribute-lft-out--81.9%
associate-*r/81.9%
mul-1-neg81.9%
unsub-neg81.9%
distribute-rgt-out--81.9%
Simplified81.9%
if -9.50000000000000062e35 < z < 7.5000000000000004e-37Initial program 88.5%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in a around inf 73.8%
associate-/l*83.4%
Simplified83.4%
if 7.5000000000000004e-37 < z Initial program 43.9%
+-commutative43.9%
associate-/l*65.2%
fma-define65.3%
Simplified65.3%
Taylor expanded in a around 0 43.4%
mul-1-neg43.4%
distribute-neg-frac243.4%
Simplified43.4%
Taylor expanded in y around 0 60.4%
div-sub60.4%
associate-/l*50.1%
mul-1-neg50.1%
unsub-neg50.1%
associate-/l*60.4%
Simplified60.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.4e+145)
(* t (/ (- y z) (- a z)))
(if (<= z 8e+228)
(+ x (* (- y z) (/ (- t x) (- a z))))
(- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+145) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 8e+228) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t - (((t - x) * (y - 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 <= (-2.4d+145)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 8d+228) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else
tmp = t - (((t - x) * (y - 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 <= -2.4e+145) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 8e+228) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+145: tmp = t * ((y - z) / (a - z)) elif z <= 8e+228: tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+145) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 8e+228) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+145) tmp = t * ((y - z) / (a - z)); elseif (z <= 8e+228) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+145], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+228], 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[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+145}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+228}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if z < -2.39999999999999992e145Initial program 29.0%
associate-/l*66.4%
Simplified66.4%
Taylor expanded in x around 0 44.9%
associate-/l*87.3%
Simplified87.3%
if -2.39999999999999992e145 < z < 7.9999999999999994e228Initial program 77.7%
associate-/l*86.8%
Simplified86.8%
if 7.9999999999999994e228 < z Initial program 15.2%
associate-/l*41.2%
Simplified41.2%
Taylor expanded in z around inf 73.4%
associate--l+73.4%
associate-*r/73.4%
associate-*r/73.4%
mul-1-neg73.4%
div-sub73.4%
mul-1-neg73.4%
distribute-lft-out--73.4%
associate-*r/73.4%
mul-1-neg73.4%
unsub-neg73.4%
distribute-rgt-out--73.4%
Simplified73.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z (- z a)))))
(if (<= z -8.2e+62)
t_1
(if (<= z 4.6e-46)
(* x (- 1.0 (/ y a)))
(if (<= z 2.7e+134) (/ t (/ (- a z) y)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / (z - a));
double tmp;
if (z <= -8.2e+62) {
tmp = t_1;
} else if (z <= 4.6e-46) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.7e+134) {
tmp = t / ((a - z) / y);
} 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 * (z / (z - a))
if (z <= (-8.2d+62)) then
tmp = t_1
else if (z <= 4.6d-46) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2.7d+134) then
tmp = t / ((a - z) / y)
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 * (z / (z - a));
double tmp;
if (z <= -8.2e+62) {
tmp = t_1;
} else if (z <= 4.6e-46) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.7e+134) {
tmp = t / ((a - z) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (z / (z - a)) tmp = 0 if z <= -8.2e+62: tmp = t_1 elif z <= 4.6e-46: tmp = x * (1.0 - (y / a)) elif z <= 2.7e+134: tmp = t / ((a - z) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -8.2e+62) tmp = t_1; elseif (z <= 4.6e-46) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2.7e+134) tmp = Float64(t / Float64(Float64(a - z) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (z / (z - a)); tmp = 0.0; if (z <= -8.2e+62) tmp = t_1; elseif (z <= 4.6e-46) tmp = x * (1.0 - (y / a)); elseif (z <= 2.7e+134) tmp = t / ((a - z) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+62], t$95$1, If[LessEqual[z, 4.6e-46], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+134], N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-46}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+134}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.19999999999999967e62 or 2.7e134 < z Initial program 32.5%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in y around 0 26.0%
mul-1-neg26.0%
unsub-neg26.0%
associate-/l*50.9%
Simplified50.9%
Taylor expanded in x around 0 32.5%
mul-1-neg32.5%
associate-/l*62.1%
Simplified62.1%
if -8.19999999999999967e62 < z < 4.5999999999999998e-46Initial program 87.3%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in z around 0 68.6%
Taylor expanded in x around inf 64.1%
mul-1-neg64.1%
unsub-neg64.1%
Simplified64.1%
if 4.5999999999999998e-46 < z < 2.7e134Initial program 70.5%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in x around 0 51.2%
Taylor expanded in y around inf 33.8%
associate-/l*42.2%
Simplified42.2%
clear-num42.2%
un-div-inv42.2%
Applied egg-rr42.2%
Final simplification60.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1e+63)
t
(if (<= z 4.6e-46)
(* x (- 1.0 (/ y a)))
(if (<= z 2.7e+134) (/ t (/ (- a z) y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+63) {
tmp = t;
} else if (z <= 4.6e-46) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.7e+134) {
tmp = t / ((a - z) / y);
} 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 <= (-1d+63)) then
tmp = t
else if (z <= 4.6d-46) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2.7d+134) then
tmp = t / ((a - z) / y)
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 <= -1e+63) {
tmp = t;
} else if (z <= 4.6e-46) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.7e+134) {
tmp = t / ((a - z) / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+63: tmp = t elif z <= 4.6e-46: tmp = x * (1.0 - (y / a)) elif z <= 2.7e+134: tmp = t / ((a - z) / y) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+63) tmp = t; elseif (z <= 4.6e-46) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2.7e+134) tmp = Float64(t / Float64(Float64(a - z) / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+63) tmp = t; elseif (z <= 4.6e-46) tmp = x * (1.0 - (y / a)); elseif (z <= 2.7e+134) tmp = t / ((a - z) / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+63], t, If[LessEqual[z, 4.6e-46], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+134], N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+63}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-46}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+134}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.00000000000000006e63 or 2.7e134 < z Initial program 32.5%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in z around inf 56.6%
if -1.00000000000000006e63 < z < 4.5999999999999998e-46Initial program 87.3%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in z around 0 68.6%
Taylor expanded in x around inf 64.1%
mul-1-neg64.1%
unsub-neg64.1%
Simplified64.1%
if 4.5999999999999998e-46 < z < 2.7e134Initial program 70.5%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in x around 0 51.2%
Taylor expanded in y around inf 33.8%
associate-/l*42.2%
Simplified42.2%
clear-num42.2%
un-div-inv42.2%
Applied egg-rr42.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.5e+62)
t
(if (<= z 4.5e-46)
(* x (- 1.0 (/ y a)))
(if (<= z 3.05e+134) (* t (/ y (- a z))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e+62) {
tmp = t;
} else if (z <= 4.5e-46) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.05e+134) {
tmp = t * (y / (a - z));
} 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 <= (-4.5d+62)) then
tmp = t
else if (z <= 4.5d-46) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 3.05d+134) then
tmp = t * (y / (a - z))
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 <= -4.5e+62) {
tmp = t;
} else if (z <= 4.5e-46) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.05e+134) {
tmp = t * (y / (a - z));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.5e+62: tmp = t elif z <= 4.5e-46: tmp = x * (1.0 - (y / a)) elif z <= 3.05e+134: tmp = t * (y / (a - z)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.5e+62) tmp = t; elseif (z <= 4.5e-46) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 3.05e+134) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.5e+62) tmp = t; elseif (z <= 4.5e-46) tmp = x * (1.0 - (y / a)); elseif (z <= 3.05e+134) tmp = t * (y / (a - z)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+62], t, If[LessEqual[z, 4.5e-46], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+134], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+62}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-46}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+134}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.49999999999999999e62 or 3.04999999999999989e134 < z Initial program 32.5%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in z around inf 56.6%
if -4.49999999999999999e62 < z < 4.50000000000000001e-46Initial program 87.3%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in z around 0 68.6%
Taylor expanded in x around inf 64.1%
mul-1-neg64.1%
unsub-neg64.1%
Simplified64.1%
if 4.50000000000000001e-46 < z < 3.04999999999999989e134Initial program 70.5%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in x around 0 51.2%
Taylor expanded in y around inf 33.8%
associate-/l*42.2%
Simplified42.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.8e+63) t (if (<= z 4.5e-46) x (if (<= z 2.7e+134) (* t (/ y (- a z))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+63) {
tmp = t;
} else if (z <= 4.5e-46) {
tmp = x;
} else if (z <= 2.7e+134) {
tmp = t * (y / (a - z));
} 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 <= (-2.8d+63)) then
tmp = t
else if (z <= 4.5d-46) then
tmp = x
else if (z <= 2.7d+134) then
tmp = t * (y / (a - z))
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 <= -2.8e+63) {
tmp = t;
} else if (z <= 4.5e-46) {
tmp = x;
} else if (z <= 2.7e+134) {
tmp = t * (y / (a - z));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+63: tmp = t elif z <= 4.5e-46: tmp = x elif z <= 2.7e+134: tmp = t * (y / (a - z)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+63) tmp = t; elseif (z <= 4.5e-46) tmp = x; elseif (z <= 2.7e+134) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e+63) tmp = t; elseif (z <= 4.5e-46) tmp = x; elseif (z <= 2.7e+134) tmp = t * (y / (a - z)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+63], t, If[LessEqual[z, 4.5e-46], x, If[LessEqual[z, 2.7e+134], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+63}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+134}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.79999999999999987e63 or 2.7e134 < z Initial program 32.5%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in z around inf 56.6%
if -2.79999999999999987e63 < z < 4.50000000000000001e-46Initial program 87.3%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in a around inf 41.2%
if 4.50000000000000001e-46 < z < 2.7e134Initial program 70.5%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in x around 0 51.2%
Taylor expanded in y around inf 33.8%
associate-/l*42.2%
Simplified42.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.6e+35) (not (<= z 9.2e-37))) (- t (* y (/ (- t x) z))) (+ x (* (- t x) (/ (- y z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.6e+35) || !(z <= 9.2e-37)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + ((t - x) * ((y - 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 ((z <= (-9.6d+35)) .or. (.not. (z <= 9.2d-37))) then
tmp = t - (y * ((t - x) / z))
else
tmp = x + ((t - x) * ((y - 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 ((z <= -9.6e+35) || !(z <= 9.2e-37)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + ((t - x) * ((y - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.6e+35) or not (z <= 9.2e-37): tmp = t - (y * ((t - x) / z)) else: tmp = x + ((t - x) * ((y - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.6e+35) || !(z <= 9.2e-37)) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.6e+35) || ~((z <= 9.2e-37))) tmp = t - (y * ((t - x) / z)); else tmp = x + ((t - x) * ((y - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.6e+35], N[Not[LessEqual[z, 9.2e-37]], $MachinePrecision]], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+35} \lor \neg \left(z \leq 9.2 \cdot 10^{-37}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if z < -9.60000000000000058e35 or 9.1999999999999999e-37 < z Initial program 42.6%
+-commutative42.6%
associate-/l*66.8%
fma-define67.0%
Simplified67.0%
Taylor expanded in a around 0 48.4%
mul-1-neg48.4%
distribute-neg-frac248.4%
Simplified48.4%
Taylor expanded in y around 0 68.2%
div-sub68.2%
associate-/l*60.5%
mul-1-neg60.5%
unsub-neg60.5%
associate-/l*68.2%
Simplified68.2%
if -9.60000000000000058e35 < z < 9.1999999999999999e-37Initial program 88.5%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in a around inf 73.8%
associate-/l*83.4%
Simplified83.4%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -650.0) (not (<= z 6.8e-37))) (- t (* y (/ (- t x) z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -650.0) || !(z <= 6.8e-37)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + ((t - x) * (y / 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 ((z <= (-650.0d0)) .or. (.not. (z <= 6.8d-37))) then
tmp = t - (y * ((t - x) / z))
else
tmp = x + ((t - x) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -650.0) || !(z <= 6.8e-37)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -650.0) or not (z <= 6.8e-37): tmp = t - (y * ((t - x) / z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -650.0) || !(z <= 6.8e-37)) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -650.0) || ~((z <= 6.8e-37))) tmp = t - (y * ((t - x) / z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -650.0], N[Not[LessEqual[z, 6.8e-37]], $MachinePrecision]], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -650 \lor \neg \left(z \leq 6.8 \cdot 10^{-37}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -650 or 6.80000000000000037e-37 < z Initial program 47.0%
+-commutative47.0%
associate-/l*69.7%
fma-define69.9%
Simplified69.9%
Taylor expanded in a around 0 48.7%
mul-1-neg48.7%
distribute-neg-frac248.7%
Simplified48.7%
Taylor expanded in y around 0 66.8%
div-sub66.8%
associate-/l*59.8%
mul-1-neg59.8%
unsub-neg59.8%
associate-/l*66.8%
Simplified66.8%
if -650 < z < 6.80000000000000037e-37Initial program 88.1%
associate-/l*93.1%
Simplified93.1%
associate-*r/88.1%
clear-num88.1%
associate-/r*97.8%
Applied egg-rr97.8%
Taylor expanded in z around 0 73.6%
*-commutative73.6%
associate-*r/83.3%
Simplified83.3%
Final simplification74.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -27.0) (not (<= z 3.5e+27))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -27.0) || !(z <= 3.5e+27)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / 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 ((z <= (-27.0d0)) .or. (.not. (z <= 3.5d+27))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -27.0) || !(z <= 3.5e+27)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -27.0) or not (z <= 3.5e+27): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -27.0) || !(z <= 3.5e+27)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -27.0) || ~((z <= 3.5e+27))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -27.0], N[Not[LessEqual[z, 3.5e+27]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -27 \lor \neg \left(z \leq 3.5 \cdot 10^{+27}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -27 or 3.5000000000000002e27 < z Initial program 44.3%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in x around 0 40.0%
associate-/l*64.9%
Simplified64.9%
if -27 < z < 3.5000000000000002e27Initial program 87.5%
associate-/l*92.9%
Simplified92.9%
associate-*r/87.5%
clear-num87.5%
associate-/r*97.2%
Applied egg-rr97.2%
Taylor expanded in z around 0 71.1%
*-commutative71.1%
associate-*r/80.8%
Simplified80.8%
Final simplification72.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -650.0) (not (<= z 4.1e+27))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -650.0) || !(z <= 4.1e+27)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / 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 ((z <= (-650.0d0)) .or. (.not. (z <= 4.1d+27))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -650.0) || !(z <= 4.1e+27)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -650.0) or not (z <= 4.1e+27): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -650.0) || !(z <= 4.1e+27)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -650.0) || ~((z <= 4.1e+27))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -650.0], N[Not[LessEqual[z, 4.1e+27]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -650 \lor \neg \left(z \leq 4.1 \cdot 10^{+27}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -650 or 4.1000000000000002e27 < z Initial program 44.3%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in x around 0 40.0%
associate-/l*64.9%
Simplified64.9%
if -650 < z < 4.1000000000000002e27Initial program 87.5%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around 0 71.1%
associate-/l*78.5%
Simplified78.5%
Final simplification71.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -140000.0) (not (<= z 4e-46))) (* t (/ (- y z) (- a z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -140000.0) || !(z <= 4e-46)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x * (1.0 - (y / 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 ((z <= (-140000.0d0)) .or. (.not. (z <= 4d-46))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -140000.0) || !(z <= 4e-46)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -140000.0) or not (z <= 4e-46): tmp = t * ((y - z) / (a - z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -140000.0) || !(z <= 4e-46)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -140000.0) || ~((z <= 4e-46))) tmp = t * ((y - z) / (a - z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -140000.0], N[Not[LessEqual[z, 4e-46]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -140000 \lor \neg \left(z \leq 4 \cdot 10^{-46}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -1.4e5 or 4.00000000000000009e-46 < z Initial program 47.0%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in x around 0 39.6%
associate-/l*63.0%
Simplified63.0%
if -1.4e5 < z < 4.00000000000000009e-46Initial program 88.8%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around 0 74.0%
Taylor expanded in x around inf 68.1%
mul-1-neg68.1%
unsub-neg68.1%
Simplified68.1%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.05e+36) (not (<= z 1.7e+28))) (* t (- 1.0 (/ y z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.05e+36) || !(z <= 1.7e+28)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / 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 ((z <= (-1.05d+36)) .or. (.not. (z <= 1.7d+28))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x * (1.0d0 - (y / a))
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.05e+36) || !(z <= 1.7e+28)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.05e+36) or not (z <= 1.7e+28): tmp = t * (1.0 - (y / z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.05e+36) || !(z <= 1.7e+28)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.05e+36) || ~((z <= 1.7e+28))) tmp = t * (1.0 - (y / z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.05e+36], N[Not[LessEqual[z, 1.7e+28]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+36} \lor \neg \left(z \leq 1.7 \cdot 10^{+28}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -1.05000000000000002e36 or 1.7e28 < z Initial program 39.4%
+-commutative39.4%
associate-/l*64.7%
fma-define65.0%
Simplified65.0%
Taylor expanded in a around 0 48.7%
mul-1-neg48.7%
distribute-neg-frac248.7%
Simplified48.7%
Taylor expanded in t around inf 36.2%
associate-/l*58.3%
div-sub58.3%
*-inverses58.3%
associate-*r*58.3%
mul-1-neg58.3%
sub-neg58.3%
metadata-eval58.3%
Simplified58.3%
if -1.05000000000000002e36 < z < 1.7e28Initial program 87.9%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in z around 0 68.1%
Taylor expanded in x around inf 63.0%
mul-1-neg63.0%
unsub-neg63.0%
Simplified63.0%
Final simplification60.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.1e+60) t (if (<= z 4.8e+27) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.1e+60) {
tmp = t;
} else if (z <= 4.8e+27) {
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 <= (-5.1d+60)) then
tmp = t
else if (z <= 4.8d+27) 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 <= -5.1e+60) {
tmp = t;
} else if (z <= 4.8e+27) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.1e+60: tmp = t elif z <= 4.8e+27: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.1e+60) tmp = t; elseif (z <= 4.8e+27) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.1e+60) tmp = t; elseif (z <= 4.8e+27) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.1e+60], t, If[LessEqual[z, 4.8e+27], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+60}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.09999999999999996e60 or 4.79999999999999995e27 < z Initial program 38.1%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in z around inf 50.2%
if -5.09999999999999996e60 < z < 4.79999999999999995e27Initial program 86.5%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in a around inf 40.4%
(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 66.1%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in z around inf 25.4%
(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 2024086
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))