
(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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))) (t_2 (/ z (- t x))))
(if (<= t_1 -1e-280)
(fma (/ (- y z) (- a z)) (- t x) x)
(if (<= t_1 0.0)
(+ (- t (/ y t_2)) (/ a t_2))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
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 = z / (t - x);
double tmp;
if (t_1 <= -1e-280) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else if (t_1 <= 0.0) {
tmp = (t - (y / t_2)) + (a / t_2);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
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(z / Float64(t - x)) tmp = 0.0 if (t_1 <= -1e-280) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); elseif (t_1 <= 0.0) tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return 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[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-280], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-281Initial program 91.8%
+-commutative91.8%
remove-double-neg91.8%
unsub-neg91.8%
associate-*r/76.4%
associate-/l*91.5%
associate-/r/95.8%
fma-neg95.8%
remove-double-neg95.8%
Simplified95.8%
if -9.9999999999999996e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.6%
Taylor expanded in y around 0 2.7%
div-sub2.7%
associate-*r/2.7%
mul-1-neg2.7%
distribute-lft-neg-out2.7%
associate-*r/3.6%
*-commutative3.6%
distribute-lft-out3.6%
sub-neg3.6%
associate-/r/3.6%
Simplified3.6%
Taylor expanded in z around inf 82.2%
sub-neg82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
associate-/l*89.0%
mul-1-neg89.0%
remove-double-neg89.0%
associate-/l*99.7%
Simplified99.7%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.6%
Taylor expanded in y around 0 77.2%
div-sub77.2%
associate-*r/77.2%
mul-1-neg77.2%
distribute-lft-neg-out77.2%
associate-*r/90.5%
*-commutative90.5%
distribute-lft-out91.6%
sub-neg91.6%
associate-/r/97.5%
Simplified97.5%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -1e-208)
t_1
(if (<= t_1 2e-150)
(- t (/ (* (- t x) (- y a)) z))
(if (<= t_1 2e+294) 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 <= -1e-208) {
tmp = t_1;
} else if (t_1 <= 2e-150) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_1 <= 2e+294) {
tmp = t_1;
} else {
tmp = x + (((y - z) * (t - x)) / (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-208)) then
tmp = t_1
else if (t_1 <= 2d-150) then
tmp = t - (((t - x) * (y - a)) / z)
else if (t_1 <= 2d+294) then
tmp = t_1
else
tmp = x + (((y - z) * (t - x)) / (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-208) {
tmp = t_1;
} else if (t_1 <= 2e-150) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_1 <= 2e+294) {
tmp = t_1;
} else {
tmp = x + (((y - z) * (t - x)) / (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-208: tmp = t_1 elif t_1 <= 2e-150: tmp = t - (((t - x) * (y - a)) / z) elif t_1 <= 2e+294: 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(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -1e-208) tmp = t_1; elseif (t_1 <= 2e-150) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); elseif (t_1 <= 2e+294) tmp = t_1; else tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(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-208) tmp = t_1; elseif (t_1 <= 2e-150) tmp = t - (((t - x) * (y - a)) / z); elseif (t_1 <= 2e+294) tmp = t_1; else tmp = x + (((y - z) * (t - x)) / (a - z)); 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]}, If[LessEqual[t$95$1, -1e-208], t$95$1, If[LessEqual[t$95$1, 2e-150], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+294], t$95$1, N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-208}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-150}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+294}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.0000000000000001e-208 or 2.00000000000000001e-150 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000013e294Initial program 95.7%
if -1.0000000000000001e-208 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000001e-150Initial program 12.3%
Taylor expanded in z around -inf 75.9%
+-commutative75.9%
mul-1-neg75.9%
unsub-neg75.9%
distribute-rgt-out--75.9%
Simplified75.9%
if 2.00000000000000013e294 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 75.0%
associate-*r/99.9%
Simplified99.9%
Final simplification93.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))) (t_2 (/ z (- t x))))
(if (or (<= t_1 -1e-280) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ (- t (/ y t_2)) (/ a t_2)))))
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 = z / (t - x);
double tmp;
if ((t_1 <= -1e-280) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
t_2 = z / (t - x)
if ((t_1 <= (-1d-280)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = (t - (y / t_2)) + (a / 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 + ((y - z) * ((t - x) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if ((t_1 <= -1e-280) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = z / (t - x) tmp = 0 if (t_1 <= -1e-280) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = (t - (y / t_2)) + (a / t_2) 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(z / Float64(t - x)) tmp = 0.0 if ((t_1 <= -1e-280) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = z / (t - x); tmp = 0.0; if ((t_1 <= -1e-280) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = (t - (y / t_2)) + (a / t_2); 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[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-280], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-280} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-281 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
Taylor expanded in y around 0 77.7%
div-sub78.2%
associate-*r/78.2%
mul-1-neg78.2%
distribute-lft-neg-out78.2%
associate-*r/89.4%
*-commutative89.4%
distribute-lft-out91.7%
sub-neg91.7%
associate-/r/96.4%
Simplified96.4%
if -9.9999999999999996e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.6%
Taylor expanded in y around 0 2.7%
div-sub2.7%
associate-*r/2.7%
mul-1-neg2.7%
distribute-lft-neg-out2.7%
associate-*r/3.6%
*-commutative3.6%
distribute-lft-out3.6%
sub-neg3.6%
associate-/r/3.6%
Simplified3.6%
Taylor expanded in z around inf 82.2%
sub-neg82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
associate-/l*89.0%
mul-1-neg89.0%
remove-double-neg89.0%
associate-/l*99.7%
Simplified99.7%
Final simplification96.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-208) (not (<= t_1 2e-150)))
t_1
(- 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-208) || !(t_1 <= 2e-150)) {
tmp = t_1;
} 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-208)) .or. (.not. (t_1 <= 2d-150))) then
tmp = t_1
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-208) || !(t_1 <= 2e-150)) {
tmp = t_1;
} 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-208) or not (t_1 <= 2e-150): tmp = t_1 else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -1e-208) || !(t_1 <= 2e-150)) tmp = t_1; 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-208) || ~((t_1 <= 2e-150))) tmp = t_1; 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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-208], N[Not[LessEqual[t$95$1, 2e-150]], $MachinePrecision]], t$95$1, 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 + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-208} \lor \neg \left(t_1 \leq 2 \cdot 10^{-150}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.0000000000000001e-208 or 2.00000000000000001e-150 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 93.9%
if -1.0000000000000001e-208 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000001e-150Initial program 12.3%
Taylor expanded in z around -inf 75.9%
+-commutative75.9%
mul-1-neg75.9%
unsub-neg75.9%
distribute-rgt-out--75.9%
Simplified75.9%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-280) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(- 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-280) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-280)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - 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 t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-280) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} 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-280) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -1e-280) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - 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) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -1e-280) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); 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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-280], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - 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}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-280} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-281 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
Taylor expanded in y around 0 77.7%
div-sub78.2%
associate-*r/78.2%
mul-1-neg78.2%
distribute-lft-neg-out78.2%
associate-*r/89.4%
*-commutative89.4%
distribute-lft-out91.7%
sub-neg91.7%
associate-/r/96.4%
Simplified96.4%
if -9.9999999999999996e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.6%
Taylor expanded in z around -inf 82.3%
+-commutative82.3%
mul-1-neg82.3%
unsub-neg82.3%
distribute-rgt-out--82.3%
Simplified82.3%
Final simplification94.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (* (- t x) (- y a)) z))))
(if (<= a -9.8e+23)
(+ x (/ (- t x) (/ a y)))
(if (<= a 3.1e-117)
t_1
(if (<= a 3.85e-66)
(* t (/ (- y z) (- a z)))
(if (<= a 6.5e+55) t_1 (+ x (/ y (/ a (- t x))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((t - x) * (y - a)) / z);
double tmp;
if (a <= -9.8e+23) {
tmp = x + ((t - x) / (a / y));
} else if (a <= 3.1e-117) {
tmp = t_1;
} else if (a <= 3.85e-66) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 6.5e+55) {
tmp = t_1;
} else {
tmp = x + (y / (a / (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 = t - (((t - x) * (y - a)) / z)
if (a <= (-9.8d+23)) then
tmp = x + ((t - x) / (a / y))
else if (a <= 3.1d-117) then
tmp = t_1
else if (a <= 3.85d-66) then
tmp = t * ((y - z) / (a - z))
else if (a <= 6.5d+55) then
tmp = t_1
else
tmp = x + (y / (a / (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 = t - (((t - x) * (y - a)) / z);
double tmp;
if (a <= -9.8e+23) {
tmp = x + ((t - x) / (a / y));
} else if (a <= 3.1e-117) {
tmp = t_1;
} else if (a <= 3.85e-66) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 6.5e+55) {
tmp = t_1;
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (((t - x) * (y - a)) / z) tmp = 0 if a <= -9.8e+23: tmp = x + ((t - x) / (a / y)) elif a <= 3.1e-117: tmp = t_1 elif a <= 3.85e-66: tmp = t * ((y - z) / (a - z)) elif a <= 6.5e+55: tmp = t_1 else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)) tmp = 0.0 if (a <= -9.8e+23) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); elseif (a <= 3.1e-117) tmp = t_1; elseif (a <= 3.85e-66) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (a <= 6.5e+55) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (((t - x) * (y - a)) / z); tmp = 0.0; if (a <= -9.8e+23) tmp = x + ((t - x) / (a / y)); elseif (a <= 3.1e-117) tmp = t_1; elseif (a <= 3.85e-66) tmp = t * ((y - z) / (a - z)); elseif (a <= 6.5e+55) tmp = t_1; else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.8e+23], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e-117], t$95$1, If[LessEqual[a, 3.85e-66], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+55], t$95$1, N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.85 \cdot 10^{-66}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if a < -9.8000000000000006e23Initial program 88.2%
Taylor expanded in y around 0 74.2%
div-sub74.2%
associate-*r/74.2%
mul-1-neg74.2%
distribute-lft-neg-out74.2%
associate-*r/88.2%
*-commutative88.2%
distribute-lft-out88.2%
sub-neg88.2%
associate-/r/95.2%
Simplified95.2%
Taylor expanded in z around 0 79.7%
if -9.8000000000000006e23 < a < 3.10000000000000011e-117 or 3.8500000000000001e-66 < a < 6.50000000000000027e55Initial program 75.2%
Taylor expanded in z around -inf 75.6%
+-commutative75.6%
mul-1-neg75.6%
unsub-neg75.6%
distribute-rgt-out--75.6%
Simplified75.6%
if 3.10000000000000011e-117 < a < 3.8500000000000001e-66Initial program 92.8%
Taylor expanded in x around 0 70.8%
associate-*r/92.4%
Simplified92.4%
if 6.50000000000000027e55 < a Initial program 92.9%
Taylor expanded in z around 0 68.9%
+-commutative68.9%
associate-/l*79.0%
Simplified79.0%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= x -8.5e-116)
t_1
(if (<= x -1.95e-267)
(/ (* y t) (- a z))
(if (<= x 1.9e-282)
t
(if (<= x 1.02e-162)
(/ y (/ (- a z) t))
(if (<= x 1.2e-14) t t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -8.5e-116) {
tmp = t_1;
} else if (x <= -1.95e-267) {
tmp = (y * t) / (a - z);
} else if (x <= 1.9e-282) {
tmp = t;
} else if (x <= 1.02e-162) {
tmp = y / ((a - z) / t);
} else if (x <= 1.2e-14) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (x <= (-8.5d-116)) then
tmp = t_1
else if (x <= (-1.95d-267)) then
tmp = (y * t) / (a - z)
else if (x <= 1.9d-282) then
tmp = t
else if (x <= 1.02d-162) then
tmp = y / ((a - z) / t)
else if (x <= 1.2d-14) then
tmp = t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -8.5e-116) {
tmp = t_1;
} else if (x <= -1.95e-267) {
tmp = (y * t) / (a - z);
} else if (x <= 1.9e-282) {
tmp = t;
} else if (x <= 1.02e-162) {
tmp = y / ((a - z) / t);
} else if (x <= 1.2e-14) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if x <= -8.5e-116: tmp = t_1 elif x <= -1.95e-267: tmp = (y * t) / (a - z) elif x <= 1.9e-282: tmp = t elif x <= 1.02e-162: tmp = y / ((a - z) / t) elif x <= 1.2e-14: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -8.5e-116) tmp = t_1; elseif (x <= -1.95e-267) tmp = Float64(Float64(y * t) / Float64(a - z)); elseif (x <= 1.9e-282) tmp = t; elseif (x <= 1.02e-162) tmp = Float64(y / Float64(Float64(a - z) / t)); elseif (x <= 1.2e-14) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -8.5e-116) tmp = t_1; elseif (x <= -1.95e-267) tmp = (y * t) / (a - z); elseif (x <= 1.9e-282) tmp = t; elseif (x <= 1.02e-162) tmp = y / ((a - z) / t); elseif (x <= 1.2e-14) tmp = t; else tmp = t_1; 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]}, If[LessEqual[x, -8.5e-116], t$95$1, If[LessEqual[x, -1.95e-267], N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e-282], t, If[LessEqual[x, 1.02e-162], N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e-14], t, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.95 \cdot 10^{-267}:\\
\;\;\;\;\frac{y \cdot t}{a - z}\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-282}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-162}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t}}\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-14}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -8.4999999999999995e-116 or 1.2e-14 < x Initial program 81.1%
Taylor expanded in y around 0 64.2%
div-sub64.8%
associate-*r/64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
associate-*r/78.5%
*-commutative78.5%
distribute-lft-out81.1%
sub-neg81.1%
associate-/r/83.0%
Simplified83.0%
Taylor expanded in z around 0 56.4%
Taylor expanded in x around inf 52.6%
*-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
if -8.4999999999999995e-116 < x < -1.94999999999999988e-267Initial program 85.2%
Taylor expanded in x around 0 65.4%
Taylor expanded in y around inf 55.0%
if -1.94999999999999988e-267 < x < 1.89999999999999996e-282 or 1.01999999999999998e-162 < x < 1.2e-14Initial program 85.5%
Taylor expanded in z around inf 46.7%
if 1.89999999999999996e-282 < x < 1.01999999999999998e-162Initial program 81.2%
Taylor expanded in x around 0 76.4%
Taylor expanded in y around inf 47.7%
associate-/l*52.4%
Simplified52.4%
Final simplification51.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t) (/ z (- y z)))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -1.5e+30)
t_2
(if (<= a -3.2e-151)
t_1
(if (<= a -6.8e-195) (/ (* x y) z) (if (<= a 0.0042) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (z / (y - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -1.5e+30) {
tmp = t_2;
} else if (a <= -3.2e-151) {
tmp = t_1;
} else if (a <= -6.8e-195) {
tmp = (x * y) / z;
} else if (a <= 0.0042) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -t / (z / (y - z))
t_2 = x * (1.0d0 - (y / a))
if (a <= (-1.5d+30)) then
tmp = t_2
else if (a <= (-3.2d-151)) then
tmp = t_1
else if (a <= (-6.8d-195)) then
tmp = (x * y) / z
else if (a <= 0.0042d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (z / (y - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -1.5e+30) {
tmp = t_2;
} else if (a <= -3.2e-151) {
tmp = t_1;
} else if (a <= -6.8e-195) {
tmp = (x * y) / z;
} else if (a <= 0.0042) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -t / (z / (y - z)) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -1.5e+30: tmp = t_2 elif a <= -3.2e-151: tmp = t_1 elif a <= -6.8e-195: tmp = (x * y) / z elif a <= 0.0042: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-t) / Float64(z / Float64(y - z))) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -1.5e+30) tmp = t_2; elseif (a <= -3.2e-151) tmp = t_1; elseif (a <= -6.8e-195) tmp = Float64(Float64(x * y) / z); elseif (a <= 0.0042) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -t / (z / (y - z)); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -1.5e+30) tmp = t_2; elseif (a <= -3.2e-151) tmp = t_1; elseif (a <= -6.8e-195) tmp = (x * y) / z; elseif (a <= 0.0042) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5e+30], t$95$2, If[LessEqual[a, -3.2e-151], t$95$1, If[LessEqual[a, -6.8e-195], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 0.0042], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{z}{y - z}}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -1.5 \cdot 10^{+30}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-151}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -6.8 \cdot 10^{-195}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;a \leq 0.0042:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.49999999999999989e30 or 0.00419999999999999974 < a Initial program 88.5%
Taylor expanded in y around 0 77.0%
div-sub77.0%
associate-*r/77.0%
mul-1-neg77.0%
distribute-lft-neg-out77.0%
associate-*r/88.5%
*-commutative88.5%
distribute-lft-out88.5%
sub-neg88.5%
associate-/r/92.1%
Simplified92.1%
Taylor expanded in z around 0 76.0%
Taylor expanded in x around inf 60.5%
*-commutative60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
if -1.49999999999999989e30 < a < -3.20000000000000021e-151 or -6.80000000000000003e-195 < a < 0.00419999999999999974Initial program 76.8%
Taylor expanded in x around 0 54.0%
Taylor expanded in a around 0 46.1%
mul-1-neg46.1%
associate-/l*57.5%
Simplified57.5%
if -3.20000000000000021e-151 < a < -6.80000000000000003e-195Initial program 81.6%
Taylor expanded in x around inf 63.1%
*-commutative63.1%
distribute-rgt-in63.0%
*-lft-identity63.0%
mul-1-neg63.0%
distribute-lft-neg-in63.0%
distribute-rgt-neg-out63.0%
associate-*l/62.9%
distribute-rgt-neg-out62.9%
mul-1-neg62.9%
associate-*r/62.9%
mul-1-neg62.9%
unsub-neg62.9%
associate-/l*56.7%
Simplified56.7%
Taylor expanded in y around inf 53.6%
associate-*r/53.6%
associate-*r*53.6%
mul-1-neg53.6%
Simplified53.6%
Taylor expanded in a around 0 51.8%
Final simplification58.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t) (/ z (- y z)))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -6.5e+26)
t_2
(if (<= a -5.4e-115)
t_1
(if (<= a -3e-195)
(/ (- y) (/ (- a z) x))
(if (<= a 136.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (z / (y - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -6.5e+26) {
tmp = t_2;
} else if (a <= -5.4e-115) {
tmp = t_1;
} else if (a <= -3e-195) {
tmp = -y / ((a - z) / x);
} else if (a <= 136.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -t / (z / (y - z))
t_2 = x * (1.0d0 - (y / a))
if (a <= (-6.5d+26)) then
tmp = t_2
else if (a <= (-5.4d-115)) then
tmp = t_1
else if (a <= (-3d-195)) then
tmp = -y / ((a - z) / x)
else if (a <= 136.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (z / (y - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -6.5e+26) {
tmp = t_2;
} else if (a <= -5.4e-115) {
tmp = t_1;
} else if (a <= -3e-195) {
tmp = -y / ((a - z) / x);
} else if (a <= 136.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -t / (z / (y - z)) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -6.5e+26: tmp = t_2 elif a <= -5.4e-115: tmp = t_1 elif a <= -3e-195: tmp = -y / ((a - z) / x) elif a <= 136.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-t) / Float64(z / Float64(y - z))) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -6.5e+26) tmp = t_2; elseif (a <= -5.4e-115) tmp = t_1; elseif (a <= -3e-195) tmp = Float64(Float64(-y) / Float64(Float64(a - z) / x)); elseif (a <= 136.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -t / (z / (y - z)); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -6.5e+26) tmp = t_2; elseif (a <= -5.4e-115) tmp = t_1; elseif (a <= -3e-195) tmp = -y / ((a - z) / x); elseif (a <= 136.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e+26], t$95$2, If[LessEqual[a, -5.4e-115], t$95$1, If[LessEqual[a, -3e-195], N[((-y) / N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 136.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{z}{y - z}}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -5.4 \cdot 10^{-115}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-195}:\\
\;\;\;\;\frac{-y}{\frac{a - z}{x}}\\
\mathbf{elif}\;a \leq 136:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -6.50000000000000022e26 or 136 < a Initial program 88.5%
Taylor expanded in y around 0 77.0%
div-sub77.0%
associate-*r/77.0%
mul-1-neg77.0%
distribute-lft-neg-out77.0%
associate-*r/88.5%
*-commutative88.5%
distribute-lft-out88.5%
sub-neg88.5%
associate-/r/92.1%
Simplified92.1%
Taylor expanded in z around 0 76.0%
Taylor expanded in x around inf 60.5%
*-commutative60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
if -6.50000000000000022e26 < a < -5.4e-115 or -3e-195 < a < 136Initial program 77.5%
Taylor expanded in x around 0 54.4%
Taylor expanded in a around 0 46.2%
mul-1-neg46.2%
associate-/l*58.1%
Simplified58.1%
if -5.4e-115 < a < -3e-195Initial program 76.4%
Taylor expanded in x around inf 56.9%
*-commutative56.9%
distribute-rgt-in56.9%
*-lft-identity56.9%
mul-1-neg56.9%
distribute-lft-neg-in56.9%
distribute-rgt-neg-out56.9%
associate-*l/53.2%
distribute-rgt-neg-out53.2%
mul-1-neg53.2%
associate-*r/53.2%
mul-1-neg53.2%
unsub-neg53.2%
associate-/l*52.1%
Simplified52.1%
Taylor expanded in y around inf 46.7%
associate-*r/46.7%
associate-*r*46.7%
mul-1-neg46.7%
Simplified46.7%
Taylor expanded in y around 0 46.7%
mul-1-neg46.7%
associate-/l*50.9%
distribute-neg-frac50.9%
Simplified50.9%
Final simplification58.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.8e+23)
x
(if (<= a -2.1e-115)
t
(if (<= a -9.5e-304)
(/ y (/ z x))
(if (<= a 2e-176) t (if (<= a 6.5e-10) (* t (/ y a)) x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.8e+23) {
tmp = x;
} else if (a <= -2.1e-115) {
tmp = t;
} else if (a <= -9.5e-304) {
tmp = y / (z / x);
} else if (a <= 2e-176) {
tmp = t;
} else if (a <= 6.5e-10) {
tmp = t * (y / a);
} else {
tmp = 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) :: tmp
if (a <= (-5.8d+23)) then
tmp = x
else if (a <= (-2.1d-115)) then
tmp = t
else if (a <= (-9.5d-304)) then
tmp = y / (z / x)
else if (a <= 2d-176) then
tmp = t
else if (a <= 6.5d-10) then
tmp = t * (y / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.8e+23) {
tmp = x;
} else if (a <= -2.1e-115) {
tmp = t;
} else if (a <= -9.5e-304) {
tmp = y / (z / x);
} else if (a <= 2e-176) {
tmp = t;
} else if (a <= 6.5e-10) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.8e+23: tmp = x elif a <= -2.1e-115: tmp = t elif a <= -9.5e-304: tmp = y / (z / x) elif a <= 2e-176: tmp = t elif a <= 6.5e-10: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.8e+23) tmp = x; elseif (a <= -2.1e-115) tmp = t; elseif (a <= -9.5e-304) tmp = Float64(y / Float64(z / x)); elseif (a <= 2e-176) tmp = t; elseif (a <= 6.5e-10) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.8e+23) tmp = x; elseif (a <= -2.1e-115) tmp = t; elseif (a <= -9.5e-304) tmp = y / (z / x); elseif (a <= 2e-176) tmp = t; elseif (a <= 6.5e-10) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.8e+23], x, If[LessEqual[a, -2.1e-115], t, If[LessEqual[a, -9.5e-304], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-176], t, If[LessEqual[a, 6.5e-10], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{-115}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-304}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-176}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-10}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.80000000000000025e23 or 6.5000000000000003e-10 < a Initial program 88.0%
Taylor expanded in a around inf 49.8%
if -5.80000000000000025e23 < a < -2.10000000000000002e-115 or -9.50000000000000023e-304 < a < 2e-176Initial program 78.3%
Taylor expanded in z around inf 54.4%
if -2.10000000000000002e-115 < a < -9.50000000000000023e-304Initial program 72.4%
Taylor expanded in x around inf 46.2%
*-commutative46.2%
distribute-rgt-in46.2%
*-lft-identity46.2%
mul-1-neg46.2%
distribute-lft-neg-in46.2%
distribute-rgt-neg-out46.2%
associate-*l/41.9%
distribute-rgt-neg-out41.9%
mul-1-neg41.9%
associate-*r/41.9%
mul-1-neg41.9%
unsub-neg41.9%
associate-/l*41.1%
Simplified41.1%
Taylor expanded in y around inf 42.1%
associate-*r/42.1%
associate-*r*42.1%
mul-1-neg42.1%
Simplified42.1%
Taylor expanded in a around 0 41.3%
associate-/l*44.8%
Simplified44.8%
if 2e-176 < a < 6.5000000000000003e-10Initial program 80.8%
Taylor expanded in x around 0 61.3%
Taylor expanded in z around 0 27.2%
associate-/l*25.4%
Simplified25.4%
associate-/r/29.3%
Applied egg-rr29.3%
Final simplification46.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= x -1.16e-113)
t_1
(if (<= x -2e-251) (* t (/ y a)) (if (<= x 1.36e-14) t t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -1.16e-113) {
tmp = t_1;
} else if (x <= -2e-251) {
tmp = t * (y / a);
} else if (x <= 1.36e-14) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (x <= (-1.16d-113)) then
tmp = t_1
else if (x <= (-2d-251)) then
tmp = t * (y / a)
else if (x <= 1.36d-14) then
tmp = t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -1.16e-113) {
tmp = t_1;
} else if (x <= -2e-251) {
tmp = t * (y / a);
} else if (x <= 1.36e-14) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if x <= -1.16e-113: tmp = t_1 elif x <= -2e-251: tmp = t * (y / a) elif x <= 1.36e-14: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -1.16e-113) tmp = t_1; elseif (x <= -2e-251) tmp = Float64(t * Float64(y / a)); elseif (x <= 1.36e-14) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -1.16e-113) tmp = t_1; elseif (x <= -2e-251) tmp = t * (y / a); elseif (x <= 1.36e-14) tmp = t; else tmp = t_1; 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]}, If[LessEqual[x, -1.16e-113], t$95$1, If[LessEqual[x, -2e-251], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.36e-14], t, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-251}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;x \leq 1.36 \cdot 10^{-14}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.15999999999999999e-113 or 1.36e-14 < x Initial program 81.1%
Taylor expanded in y around 0 64.2%
div-sub64.8%
associate-*r/64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
associate-*r/78.5%
*-commutative78.5%
distribute-lft-out81.1%
sub-neg81.1%
associate-/r/83.0%
Simplified83.0%
Taylor expanded in z around 0 56.4%
Taylor expanded in x around inf 52.6%
*-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
if -1.15999999999999999e-113 < x < -2.00000000000000003e-251Initial program 85.2%
Taylor expanded in x around 0 65.4%
Taylor expanded in z around 0 41.0%
associate-/l*41.2%
Simplified41.2%
associate-/r/44.6%
Applied egg-rr44.6%
if -2.00000000000000003e-251 < x < 1.36e-14Initial program 84.3%
Taylor expanded in z around inf 38.5%
Final simplification47.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= x -5.5e-112)
t_1
(if (<= x 2.55e-303) (* (- y z) (/ t a)) (if (<= x 3.5e-12) t t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -5.5e-112) {
tmp = t_1;
} else if (x <= 2.55e-303) {
tmp = (y - z) * (t / a);
} else if (x <= 3.5e-12) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (x <= (-5.5d-112)) then
tmp = t_1
else if (x <= 2.55d-303) then
tmp = (y - z) * (t / a)
else if (x <= 3.5d-12) then
tmp = t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -5.5e-112) {
tmp = t_1;
} else if (x <= 2.55e-303) {
tmp = (y - z) * (t / a);
} else if (x <= 3.5e-12) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if x <= -5.5e-112: tmp = t_1 elif x <= 2.55e-303: tmp = (y - z) * (t / a) elif x <= 3.5e-12: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -5.5e-112) tmp = t_1; elseif (x <= 2.55e-303) tmp = Float64(Float64(y - z) * Float64(t / a)); elseif (x <= 3.5e-12) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -5.5e-112) tmp = t_1; elseif (x <= 2.55e-303) tmp = (y - z) * (t / a); elseif (x <= 3.5e-12) tmp = t; else tmp = t_1; 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]}, If[LessEqual[x, -5.5e-112], t$95$1, If[LessEqual[x, 2.55e-303], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-12], t, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{-303}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-12}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -5.5e-112 or 3.5e-12 < x Initial program 81.1%
Taylor expanded in y around 0 64.2%
div-sub64.8%
associate-*r/64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
associate-*r/78.5%
*-commutative78.5%
distribute-lft-out81.1%
sub-neg81.1%
associate-/r/83.0%
Simplified83.0%
Taylor expanded in z around 0 56.4%
Taylor expanded in x around inf 52.6%
*-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
if -5.5e-112 < x < 2.55e-303Initial program 87.3%
Taylor expanded in x around 0 68.8%
Taylor expanded in a around inf 46.8%
expm1-log1p-u30.5%
expm1-udef20.9%
associate-/l*23.0%
Applied egg-rr23.0%
expm1-def32.7%
expm1-log1p49.5%
associate-/r/46.9%
*-commutative46.9%
Simplified46.9%
if 2.55e-303 < x < 3.5e-12Initial program 82.7%
Taylor expanded in z around inf 37.6%
Final simplification48.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= x -2.8e-116)
t_1
(if (<= x 1.2e-294) (/ t (/ a (- y z))) (if (<= x 2.7e-12) t t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -2.8e-116) {
tmp = t_1;
} else if (x <= 1.2e-294) {
tmp = t / (a / (y - z));
} else if (x <= 2.7e-12) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (x <= (-2.8d-116)) then
tmp = t_1
else if (x <= 1.2d-294) then
tmp = t / (a / (y - z))
else if (x <= 2.7d-12) then
tmp = t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -2.8e-116) {
tmp = t_1;
} else if (x <= 1.2e-294) {
tmp = t / (a / (y - z));
} else if (x <= 2.7e-12) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if x <= -2.8e-116: tmp = t_1 elif x <= 1.2e-294: tmp = t / (a / (y - z)) elif x <= 2.7e-12: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -2.8e-116) tmp = t_1; elseif (x <= 1.2e-294) tmp = Float64(t / Float64(a / Float64(y - z))); elseif (x <= 2.7e-12) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -2.8e-116) tmp = t_1; elseif (x <= 1.2e-294) tmp = t / (a / (y - z)); elseif (x <= 2.7e-12) tmp = t; else tmp = t_1; 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]}, If[LessEqual[x, -2.8e-116], t$95$1, If[LessEqual[x, 1.2e-294], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-12], t, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-294}:\\
\;\;\;\;\frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-12}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -2.7999999999999999e-116 or 2.6999999999999998e-12 < x Initial program 81.1%
Taylor expanded in y around 0 64.2%
div-sub64.8%
associate-*r/64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
associate-*r/78.5%
*-commutative78.5%
distribute-lft-out81.1%
sub-neg81.1%
associate-/r/83.0%
Simplified83.0%
Taylor expanded in z around 0 56.4%
Taylor expanded in x around inf 52.6%
*-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
if -2.7999999999999999e-116 < x < 1.19999999999999999e-294Initial program 86.4%
Taylor expanded in x around 0 70.2%
Taylor expanded in a around inf 47.1%
associate-/l*49.6%
Simplified49.6%
if 1.19999999999999999e-294 < x < 2.6999999999999998e-12Initial program 83.2%
Taylor expanded in z around inf 37.1%
Final simplification48.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= x -4.4e-111)
t_1
(if (<= x 1.4e-162) (/ y (/ (- a z) t)) (if (<= x 1.25e-12) t t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -4.4e-111) {
tmp = t_1;
} else if (x <= 1.4e-162) {
tmp = y / ((a - z) / t);
} else if (x <= 1.25e-12) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (x <= (-4.4d-111)) then
tmp = t_1
else if (x <= 1.4d-162) then
tmp = y / ((a - z) / t)
else if (x <= 1.25d-12) then
tmp = t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -4.4e-111) {
tmp = t_1;
} else if (x <= 1.4e-162) {
tmp = y / ((a - z) / t);
} else if (x <= 1.25e-12) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if x <= -4.4e-111: tmp = t_1 elif x <= 1.4e-162: tmp = y / ((a - z) / t) elif x <= 1.25e-12: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -4.4e-111) tmp = t_1; elseif (x <= 1.4e-162) tmp = Float64(y / Float64(Float64(a - z) / t)); elseif (x <= 1.25e-12) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -4.4e-111) tmp = t_1; elseif (x <= 1.4e-162) tmp = y / ((a - z) / t); elseif (x <= 1.25e-12) tmp = t; else tmp = t_1; 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]}, If[LessEqual[x, -4.4e-111], t$95$1, If[LessEqual[x, 1.4e-162], N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.25e-12], t, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{-111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-162}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t}}\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-12}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -4.4e-111 or 1.24999999999999992e-12 < x Initial program 81.1%
Taylor expanded in y around 0 64.2%
div-sub64.8%
associate-*r/64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
associate-*r/78.5%
*-commutative78.5%
distribute-lft-out81.1%
sub-neg81.1%
associate-/r/83.0%
Simplified83.0%
Taylor expanded in z around 0 56.4%
Taylor expanded in x around inf 52.6%
*-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
if -4.4e-111 < x < 1.40000000000000011e-162Initial program 85.6%
Taylor expanded in x around 0 72.4%
Taylor expanded in y around inf 46.2%
associate-/l*45.3%
Simplified45.3%
if 1.40000000000000011e-162 < x < 1.24999999999999992e-12Initial program 82.4%
Taylor expanded in z around inf 42.0%
Final simplification49.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.9e+89) (not (<= x 8e+80))) (* x (- 1.0 (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.9e+89) || !(x <= 8e+80)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - 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 ((x <= (-3.9d+89)) .or. (.not. (x <= 8d+80))) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t * ((y - 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 ((x <= -3.9e+89) || !(x <= 8e+80)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.9e+89) or not (x <= 8e+80): tmp = x * (1.0 - (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.9e+89) || !(x <= 8e+80)) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.9e+89) || ~((x <= 8e+80))) tmp = x * (1.0 - (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.9e+89], N[Not[LessEqual[x, 8e+80]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{+89} \lor \neg \left(x \leq 8 \cdot 10^{+80}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -3.90000000000000011e89 or 8e80 < x Initial program 79.7%
Taylor expanded in y around 0 63.5%
div-sub64.6%
associate-*r/64.6%
mul-1-neg64.6%
distribute-lft-neg-out64.6%
associate-*r/76.7%
*-commutative76.7%
distribute-lft-out79.7%
sub-neg79.7%
associate-/r/82.7%
Simplified82.7%
Taylor expanded in z around 0 62.9%
Taylor expanded in x around inf 61.1%
*-commutative61.1%
mul-1-neg61.1%
unsub-neg61.1%
Simplified61.1%
if -3.90000000000000011e89 < x < 8e80Initial program 84.2%
Taylor expanded in x around 0 57.3%
associate-*r/72.7%
Simplified72.7%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.7e-14) (not (<= z 7e+130))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.7e-14) || !(z <= 7e+130)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (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) :: tmp
if ((z <= (-2.7d-14)) .or. (.not. (z <= 7d+130))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / (t - x)))
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.7e-14) || !(z <= 7e+130)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.7e-14) or not (z <= 7e+130): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.7e-14) || !(z <= 7e+130)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.7e-14) || ~((z <= 7e+130))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.7e-14], N[Not[LessEqual[z, 7e+130]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-14} \lor \neg \left(z \leq 7 \cdot 10^{+130}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -2.6999999999999999e-14 or 7.0000000000000002e130 < z Initial program 68.0%
Taylor expanded in x around 0 45.1%
associate-*r/66.2%
Simplified66.2%
if -2.6999999999999999e-14 < z < 7.0000000000000002e130Initial program 91.4%
Taylor expanded in z around 0 64.4%
+-commutative64.4%
associate-/l*69.0%
Simplified69.0%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.08e-13) (not (<= z 2.5e+130))) (* t (/ (- y z) (- a z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.08e-13) || !(z <= 2.5e+130)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
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.08d-13)) .or. (.not. (z <= 2.5d+130))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) / (a / y))
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.08e-13) || !(z <= 2.5e+130)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.08e-13) or not (z <= 2.5e+130): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.08e-13) || !(z <= 2.5e+130)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.08e-13) || ~((z <= 2.5e+130))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.08e-13], N[Not[LessEqual[z, 2.5e+130]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{-13} \lor \neg \left(z \leq 2.5 \cdot 10^{+130}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.0799999999999999e-13 or 2.4999999999999998e130 < z Initial program 68.0%
Taylor expanded in x around 0 45.1%
associate-*r/66.2%
Simplified66.2%
if -1.0799999999999999e-13 < z < 2.4999999999999998e130Initial program 91.4%
Taylor expanded in y around 0 87.0%
div-sub87.6%
associate-*r/87.6%
mul-1-neg87.6%
distribute-lft-neg-out87.6%
associate-*r/88.0%
*-commutative88.0%
distribute-lft-out91.4%
sub-neg91.4%
associate-/r/94.9%
Simplified94.9%
Taylor expanded in z around 0 71.2%
Final simplification69.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.9e+23) x (if (<= a 1.9e-176) t (if (<= a 3.4e-11) (* t (/ y a)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+23) {
tmp = x;
} else if (a <= 1.9e-176) {
tmp = t;
} else if (a <= 3.4e-11) {
tmp = t * (y / a);
} else {
tmp = 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) :: tmp
if (a <= (-2.9d+23)) then
tmp = x
else if (a <= 1.9d-176) then
tmp = t
else if (a <= 3.4d-11) then
tmp = t * (y / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+23) {
tmp = x;
} else if (a <= 1.9e-176) {
tmp = t;
} else if (a <= 3.4e-11) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e+23: tmp = x elif a <= 1.9e-176: tmp = t elif a <= 3.4e-11: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e+23) tmp = x; elseif (a <= 1.9e-176) tmp = t; elseif (a <= 3.4e-11) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.9e+23) tmp = x; elseif (a <= 1.9e-176) tmp = t; elseif (a <= 3.4e-11) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e+23], x, If[LessEqual[a, 1.9e-176], t, If[LessEqual[a, 3.4e-11], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-176}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-11}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.90000000000000013e23 or 3.3999999999999999e-11 < a Initial program 88.0%
Taylor expanded in a around inf 49.8%
if -2.90000000000000013e23 < a < 1.90000000000000006e-176Initial program 75.7%
Taylor expanded in z around inf 40.8%
if 1.90000000000000006e-176 < a < 3.3999999999999999e-11Initial program 80.8%
Taylor expanded in x around 0 61.3%
Taylor expanded in z around 0 27.2%
associate-/l*25.4%
Simplified25.4%
associate-/r/29.3%
Applied egg-rr29.3%
Final simplification43.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.3e+20) x (if (<= a 2.8e-13) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.3e+20) {
tmp = x;
} else if (a <= 2.8e-13) {
tmp = t;
} else {
tmp = 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) :: tmp
if (a <= (-5.3d+20)) then
tmp = x
else if (a <= 2.8d-13) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.3e+20) {
tmp = x;
} else if (a <= 2.8e-13) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.3e+20: tmp = x elif a <= 2.8e-13: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.3e+20) tmp = x; elseif (a <= 2.8e-13) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.3e+20) tmp = x; elseif (a <= 2.8e-13) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.3e+20], x, If[LessEqual[a, 2.8e-13], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.3 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-13}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.3e20 or 2.8000000000000002e-13 < a Initial program 88.1%
Taylor expanded in a around inf 49.4%
if -5.3e20 < a < 2.8000000000000002e-13Initial program 77.2%
Taylor expanded in z around inf 34.0%
Final simplification41.3%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 82.4%
Taylor expanded in x around inf 44.8%
*-commutative44.8%
distribute-rgt-in44.8%
*-lft-identity44.8%
mul-1-neg44.8%
distribute-lft-neg-in44.8%
distribute-rgt-neg-out44.8%
associate-*l/37.4%
distribute-rgt-neg-out37.4%
mul-1-neg37.4%
associate-*r/37.4%
mul-1-neg37.4%
unsub-neg37.4%
associate-/l*44.0%
Simplified44.0%
Taylor expanded in a around 0 14.2%
sub-neg14.2%
mul-1-neg14.2%
remove-double-neg14.2%
associate-/l*15.4%
Simplified15.4%
Taylor expanded in y around 0 2.7%
distribute-lft1-in2.7%
metadata-eval2.7%
mul0-lft2.7%
Simplified2.7%
Final simplification2.7%
(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 82.4%
Taylor expanded in z around inf 23.1%
Final simplification23.1%
herbie shell --seed 2023274
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))