
(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 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(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 -5e-273)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0) (+ (- t (/ y t_2)) (/ a 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 = z / (t - x);
double tmp;
if (t_1 <= -5e-273) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = (t - (y / t_2)) + (a / 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(z / Float64(t - x)) tmp = 0.0 if (t_1 <= -5e-273) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); else tmp = t_1; 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, -5e-273], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\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 -5 \cdot 10^{-273}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999965e-273Initial program 91.1%
+-commutative91.1%
associate-*r/76.2%
*-commutative76.2%
associate-*r/95.7%
fma-def95.8%
Simplified95.8%
if -4.99999999999999965e-273 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.7%
*-commutative3.7%
associate-*l/9.1%
associate-*r/9.6%
clear-num9.6%
un-div-inv9.6%
Applied egg-rr9.6%
Taylor expanded in z around inf 87.3%
sub-neg87.3%
+-commutative87.3%
mul-1-neg87.3%
unsub-neg87.3%
associate-/l*93.4%
mul-1-neg93.4%
remove-double-neg93.4%
associate-/l*99.8%
Simplified99.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.1%
Final simplification96.0%
(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 -5e-273)
(+ x (/ (- t x) (/ (- a z) (- y z))))
(if (<= t_1 0.0) (+ (- t (/ y t_2)) (/ a 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 = z / (t - x);
double tmp;
if (t_1 <= -5e-273) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if (t_1 <= 0.0) {
tmp = (t - (y / t_2)) + (a / 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 = z / (t - x)
if (t_1 <= (-5d-273)) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else if (t_1 <= 0.0d0) then
tmp = (t - (y / t_2)) + (a / 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 = z / (t - x);
double tmp;
if (t_1 <= -5e-273) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if (t_1 <= 0.0) {
tmp = (t - (y / t_2)) + (a / 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 = z / (t - x) tmp = 0 if t_1 <= -5e-273: tmp = x + ((t - x) / ((a - z) / (y - z))) elif t_1 <= 0.0: tmp = (t - (y / t_2)) + (a / 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(z / Float64(t - x)) tmp = 0.0 if (t_1 <= -5e-273) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); elseif (t_1 <= 0.0) tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / 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 = z / (t - x); tmp = 0.0; if (t_1 <= -5e-273) tmp = x + ((t - x) / ((a - z) / (y - z))); elseif (t_1 <= 0.0) tmp = (t - (y / t_2)) + (a / 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[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-273], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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], t$95$1]]]]
\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 -5 \cdot 10^{-273}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999965e-273Initial program 91.1%
*-commutative91.1%
associate-*l/76.2%
associate-*r/95.7%
clear-num95.7%
un-div-inv95.8%
Applied egg-rr95.8%
if -4.99999999999999965e-273 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.7%
*-commutative3.7%
associate-*l/9.1%
associate-*r/9.6%
clear-num9.6%
un-div-inv9.6%
Applied egg-rr9.6%
Taylor expanded in z around inf 87.3%
sub-neg87.3%
+-commutative87.3%
mul-1-neg87.3%
unsub-neg87.3%
associate-/l*93.4%
mul-1-neg93.4%
remove-double-neg93.4%
associate-/l*99.8%
Simplified99.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.1%
Final simplification96.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-153) (not (<= t_1 0.0)))
t_1
(+ t (/ (* (- t x) (- a 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 tmp;
if ((t_1 <= -5e-153) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-5d-153)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -5e-153) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-153) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((t - x) * (a - 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)))) tmp = 0.0 if ((t_1 <= -5e-153) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -5e-153) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((t - x) * (a - y)) / 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, -5e-153], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $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 -5 \cdot 10^{-153} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.00000000000000033e-153 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.6%
if -5.00000000000000033e-153 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 17.1%
Taylor expanded in z around inf 83.3%
+-commutative83.3%
associate--l+83.3%
associate-*r/83.3%
associate-*r/83.3%
div-sub83.3%
distribute-lft-out--83.3%
mul-1-neg83.3%
distribute-neg-frac83.3%
unsub-neg83.3%
distribute-rgt-out--83.3%
Simplified83.3%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -5e-273)
(+ x (/ (- t x) (/ (- a z) (- y z))))
(if (<= t_1 0.0) (+ t (/ (* (- t x) (- a y)) z)) 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 tmp;
if (t_1 <= -5e-273) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-5d-273)) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) * (a - y)) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -5e-273) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -5e-273: tmp = x + ((t - x) / ((a - z) / (y - z))) elif t_1 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) 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)))) tmp = 0.0 if (t_1 <= -5e-273) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); 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))); tmp = 0.0; if (t_1 <= -5e-273) tmp = x + ((t - x) / ((a - z) / (y - z))); elseif (t_1 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); 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]}, If[LessEqual[t$95$1, -5e-273], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-273}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999965e-273Initial program 91.1%
*-commutative91.1%
associate-*l/76.2%
associate-*r/95.7%
clear-num95.7%
un-div-inv95.8%
Applied egg-rr95.8%
if -4.99999999999999965e-273 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.7%
Taylor expanded in z around inf 87.3%
+-commutative87.3%
associate--l+87.3%
associate-*r/87.3%
associate-*r/87.3%
div-sub87.3%
distribute-lft-out--87.3%
mul-1-neg87.3%
distribute-neg-frac87.3%
unsub-neg87.3%
distribute-rgt-out--87.3%
Simplified87.3%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.1%
Final simplification94.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y z) (- a z))))
(if (<= z -4.6e-16)
(* t t_1)
(if (<= z 5.2e-34)
(+ x (/ y (/ a (- t x))))
(if (or (<= z 2.6e+90) (not (<= z 6.6e+120)))
(/ t (/ (- a z) (- y z)))
(* x (- 1.0 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (a - z);
double tmp;
if (z <= -4.6e-16) {
tmp = t * t_1;
} else if (z <= 5.2e-34) {
tmp = x + (y / (a / (t - x)));
} else if ((z <= 2.6e+90) || !(z <= 6.6e+120)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x * (1.0 - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) / (a - z)
if (z <= (-4.6d-16)) then
tmp = t * t_1
else if (z <= 5.2d-34) then
tmp = x + (y / (a / (t - x)))
else if ((z <= 2.6d+90) .or. (.not. (z <= 6.6d+120))) then
tmp = t / ((a - z) / (y - z))
else
tmp = x * (1.0d0 - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (a - z);
double tmp;
if (z <= -4.6e-16) {
tmp = t * t_1;
} else if (z <= 5.2e-34) {
tmp = x + (y / (a / (t - x)));
} else if ((z <= 2.6e+90) || !(z <= 6.6e+120)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x * (1.0 - t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) / (a - z) tmp = 0 if z <= -4.6e-16: tmp = t * t_1 elif z <= 5.2e-34: tmp = x + (y / (a / (t - x))) elif (z <= 2.6e+90) or not (z <= 6.6e+120): tmp = t / ((a - z) / (y - z)) else: tmp = x * (1.0 - t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) / Float64(a - z)) tmp = 0.0 if (z <= -4.6e-16) tmp = Float64(t * t_1); elseif (z <= 5.2e-34) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif ((z <= 2.6e+90) || !(z <= 6.6e+120)) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = Float64(x * Float64(1.0 - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - z) / (a - z); tmp = 0.0; if (z <= -4.6e-16) tmp = t * t_1; elseif (z <= 5.2e-34) tmp = x + (y / (a / (t - x))); elseif ((z <= 2.6e+90) || ~((z <= 6.6e+120))) tmp = t / ((a - z) / (y - z)); else tmp = x * (1.0 - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e-16], N[(t * t$95$1), $MachinePrecision], If[LessEqual[z, 5.2e-34], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.6e+90], N[Not[LessEqual[z, 6.6e+120]], $MachinePrecision]], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{-16}:\\
\;\;\;\;t \cdot t_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-34}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+90} \lor \neg \left(z \leq 6.6 \cdot 10^{+120}\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - t_1\right)\\
\end{array}
\end{array}
if z < -4.5999999999999998e-16Initial program 70.3%
Taylor expanded in t around inf 60.7%
div-sub60.7%
Simplified60.7%
if -4.5999999999999998e-16 < z < 5.1999999999999999e-34Initial program 94.8%
Taylor expanded in z around 0 79.4%
+-commutative79.4%
associate-/l*82.8%
Simplified82.8%
if 5.1999999999999999e-34 < z < 2.5999999999999998e90 or 6.59999999999999981e120 < z Initial program 70.5%
Taylor expanded in x around 0 41.2%
associate-/l*66.9%
Simplified66.9%
if 2.5999999999999998e90 < z < 6.59999999999999981e120Initial program 95.2%
Taylor expanded in x around inf 81.3%
mul-1-neg81.3%
unsub-neg81.3%
Simplified81.3%
Final simplification72.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- t x) (/ (- a z) y)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -4.4e+18)
t_2
(if (<= z 8.6e+40)
t_1
(if (<= z 4.5e+89)
t_2
(if (<= z 4.8e+120) t_1 (/ t (/ (- a z) (- y z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / ((a - z) / y));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -4.4e+18) {
tmp = t_2;
} else if (z <= 8.6e+40) {
tmp = t_1;
} else if (z <= 4.5e+89) {
tmp = t_2;
} else if (z <= 4.8e+120) {
tmp = t_1;
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) / ((a - z) / y))
t_2 = t * ((y - z) / (a - z))
if (z <= (-4.4d+18)) then
tmp = t_2
else if (z <= 8.6d+40) then
tmp = t_1
else if (z <= 4.5d+89) then
tmp = t_2
else if (z <= 4.8d+120) then
tmp = t_1
else
tmp = t / ((a - z) / (y - 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 + ((t - x) / ((a - z) / y));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -4.4e+18) {
tmp = t_2;
} else if (z <= 8.6e+40) {
tmp = t_1;
} else if (z <= 4.5e+89) {
tmp = t_2;
} else if (z <= 4.8e+120) {
tmp = t_1;
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) / ((a - z) / y)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -4.4e+18: tmp = t_2 elif z <= 8.6e+40: tmp = t_1 elif z <= 4.5e+89: tmp = t_2 elif z <= 4.8e+120: tmp = t_1 else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -4.4e+18) tmp = t_2; elseif (z <= 8.6e+40) tmp = t_1; elseif (z <= 4.5e+89) tmp = t_2; elseif (z <= 4.8e+120) tmp = t_1; else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) / ((a - z) / y)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -4.4e+18) tmp = t_2; elseif (z <= 8.6e+40) tmp = t_1; elseif (z <= 4.5e+89) tmp = t_2; elseif (z <= 4.8e+120) tmp = t_1; else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+18], t$95$2, If[LessEqual[z, 8.6e+40], t$95$1, If[LessEqual[z, 4.5e+89], t$95$2, If[LessEqual[z, 4.8e+120], t$95$1, N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a - z}{y}}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+89}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+120}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -4.4e18 or 8.6000000000000005e40 < z < 4.5e89Initial program 69.1%
Taylor expanded in t around inf 64.8%
div-sub64.8%
Simplified64.8%
if -4.4e18 < z < 8.6000000000000005e40 or 4.5e89 < z < 4.80000000000000002e120Initial program 95.5%
*-commutative95.5%
associate-*l/92.4%
associate-*r/96.3%
clear-num96.2%
un-div-inv96.2%
Applied egg-rr96.2%
Taylor expanded in y around inf 88.8%
if 4.80000000000000002e120 < z Initial program 58.0%
Taylor expanded in x around 0 29.8%
associate-/l*70.6%
Simplified70.6%
Final simplification78.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (/ t (/ (- z) (- y z)))))
(if (<= z -4.2e+19)
t_2
(if (<= z -2.4e-257)
t_1
(if (<= z -1.9e-297) (/ y (/ a t)) (if (<= z 1.56e+35) t_1 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 / (-z / (y - z));
double tmp;
if (z <= -4.2e+19) {
tmp = t_2;
} else if (z <= -2.4e-257) {
tmp = t_1;
} else if (z <= -1.9e-297) {
tmp = y / (a / t);
} else if (z <= 1.56e+35) {
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 = x * (1.0d0 - (y / a))
t_2 = t / (-z / (y - z))
if (z <= (-4.2d+19)) then
tmp = t_2
else if (z <= (-2.4d-257)) then
tmp = t_1
else if (z <= (-1.9d-297)) then
tmp = y / (a / t)
else if (z <= 1.56d+35) 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 = x * (1.0 - (y / a));
double t_2 = t / (-z / (y - z));
double tmp;
if (z <= -4.2e+19) {
tmp = t_2;
} else if (z <= -2.4e-257) {
tmp = t_1;
} else if (z <= -1.9e-297) {
tmp = y / (a / t);
} else if (z <= 1.56e+35) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) t_2 = t / (-z / (y - z)) tmp = 0 if z <= -4.2e+19: tmp = t_2 elif z <= -2.4e-257: tmp = t_1 elif z <= -1.9e-297: tmp = y / (a / t) elif z <= 1.56e+35: tmp = t_1 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(-z) / Float64(y - z))) tmp = 0.0 if (z <= -4.2e+19) tmp = t_2; elseif (z <= -2.4e-257) tmp = t_1; elseif (z <= -1.9e-297) tmp = Float64(y / Float64(a / t)); elseif (z <= 1.56e+35) tmp = t_1; 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 / (-z / (y - z)); tmp = 0.0; if (z <= -4.2e+19) tmp = t_2; elseif (z <= -2.4e-257) tmp = t_1; elseif (z <= -1.9e-297) tmp = y / (a / t); elseif (z <= 1.56e+35) tmp = t_1; 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[((-z) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+19], t$95$2, If[LessEqual[z, -2.4e-257], t$95$1, If[LessEqual[z, -1.9e-297], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.56e+35], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
t_2 := \frac{t}{\frac{-z}{y - z}}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-297}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 1.56 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.2e19 or 1.56000000000000008e35 < z Initial program 67.3%
Taylor expanded in x around 0 36.5%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in a around 0 52.8%
neg-mul-152.8%
distribute-neg-frac52.8%
Simplified52.8%
if -4.2e19 < z < -2.40000000000000017e-257 or -1.90000000000000002e-297 < z < 1.56000000000000008e35Initial program 95.3%
Taylor expanded in x around inf 65.0%
mul-1-neg65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in z around 0 60.3%
if -2.40000000000000017e-257 < z < -1.90000000000000002e-297Initial program 99.6%
Taylor expanded in x around 0 76.0%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in z around 0 76.0%
associate-/l*87.9%
Simplified87.9%
Final simplification57.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -3.2e+19)
t
(if (<= z -2.4e-257)
t_1
(if (<= z -1.7e-298) (/ y (/ a t)) (if (<= z 2.6e+39) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -3.2e+19) {
tmp = t;
} else if (z <= -2.4e-257) {
tmp = t_1;
} else if (z <= -1.7e-298) {
tmp = y / (a / t);
} else if (z <= 2.6e+39) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (z <= (-3.2d+19)) then
tmp = t
else if (z <= (-2.4d-257)) then
tmp = t_1
else if (z <= (-1.7d-298)) then
tmp = y / (a / t)
else if (z <= 2.6d+39) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -3.2e+19) {
tmp = t;
} else if (z <= -2.4e-257) {
tmp = t_1;
} else if (z <= -1.7e-298) {
tmp = y / (a / t);
} else if (z <= 2.6e+39) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if z <= -3.2e+19: tmp = t elif z <= -2.4e-257: tmp = t_1 elif z <= -1.7e-298: tmp = y / (a / t) elif z <= 2.6e+39: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (z <= -3.2e+19) tmp = t; elseif (z <= -2.4e-257) tmp = t_1; elseif (z <= -1.7e-298) tmp = Float64(y / Float64(a / t)); elseif (z <= 2.6e+39) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (z <= -3.2e+19) tmp = t; elseif (z <= -2.4e-257) tmp = t_1; elseif (z <= -1.7e-298) tmp = y / (a / t); elseif (z <= 2.6e+39) tmp = t_1; else tmp = t; 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[z, -3.2e+19], t, If[LessEqual[z, -2.4e-257], t$95$1, If[LessEqual[z, -1.7e-298], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+39], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+19}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-298}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.2e19 or 2.6e39 < z Initial program 67.3%
Taylor expanded in z around inf 48.2%
if -3.2e19 < z < -2.40000000000000017e-257 or -1.7e-298 < z < 2.6e39Initial program 95.3%
Taylor expanded in x around inf 65.0%
mul-1-neg65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in z around 0 60.3%
if -2.40000000000000017e-257 < z < -1.7e-298Initial program 99.6%
Taylor expanded in x around 0 76.0%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in z around 0 76.0%
associate-/l*87.9%
Simplified87.9%
Final simplification55.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (/ t (/ (- z a) z))))
(if (<= z -4.1e+18)
t_2
(if (<= z -2.4e-257)
t_1
(if (<= z -2.2e-297) (/ y (/ a t)) (if (<= z 4.1e+37) t_1 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 / ((z - a) / z);
double tmp;
if (z <= -4.1e+18) {
tmp = t_2;
} else if (z <= -2.4e-257) {
tmp = t_1;
} else if (z <= -2.2e-297) {
tmp = y / (a / t);
} else if (z <= 4.1e+37) {
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 = x * (1.0d0 - (y / a))
t_2 = t / ((z - a) / z)
if (z <= (-4.1d+18)) then
tmp = t_2
else if (z <= (-2.4d-257)) then
tmp = t_1
else if (z <= (-2.2d-297)) then
tmp = y / (a / t)
else if (z <= 4.1d+37) 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 = x * (1.0 - (y / a));
double t_2 = t / ((z - a) / z);
double tmp;
if (z <= -4.1e+18) {
tmp = t_2;
} else if (z <= -2.4e-257) {
tmp = t_1;
} else if (z <= -2.2e-297) {
tmp = y / (a / t);
} else if (z <= 4.1e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) t_2 = t / ((z - a) / z) tmp = 0 if z <= -4.1e+18: tmp = t_2 elif z <= -2.4e-257: tmp = t_1 elif z <= -2.2e-297: tmp = y / (a / t) elif z <= 4.1e+37: tmp = t_1 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(z - a) / z)) tmp = 0.0 if (z <= -4.1e+18) tmp = t_2; elseif (z <= -2.4e-257) tmp = t_1; elseif (z <= -2.2e-297) tmp = Float64(y / Float64(a / t)); elseif (z <= 4.1e+37) tmp = t_1; 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 / ((z - a) / z); tmp = 0.0; if (z <= -4.1e+18) tmp = t_2; elseif (z <= -2.4e-257) tmp = t_1; elseif (z <= -2.2e-297) tmp = y / (a / t); elseif (z <= 4.1e+37) tmp = t_1; 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[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+18], t$95$2, If[LessEqual[z, -2.4e-257], t$95$1, If[LessEqual[z, -2.2e-297], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
t_2 := \frac{t}{\frac{z - a}{z}}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-297}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.1e18 or 4.0999999999999998e37 < z Initial program 67.3%
Taylor expanded in x around 0 36.5%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in y around 0 56.6%
associate-*r/56.6%
neg-mul-156.6%
Simplified56.6%
if -4.1e18 < z < -2.40000000000000017e-257 or -2.1999999999999998e-297 < z < 4.0999999999999998e37Initial program 95.3%
Taylor expanded in x around inf 65.0%
mul-1-neg65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in z around 0 60.3%
if -2.40000000000000017e-257 < z < -2.1999999999999998e-297Initial program 99.6%
Taylor expanded in x around 0 76.0%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in z around 0 76.0%
associate-/l*87.9%
Simplified87.9%
Final simplification59.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.6e+37)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= z 9.5e+40)
(+ x (/ (- t x) (/ (- a z) y)))
(/ t (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+37) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 9.5e+40) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.6d+37)) then
tmp = t + (((t - x) * (a - y)) / z)
else if (z <= 9.5d+40) then
tmp = x + ((t - x) / ((a - z) / y))
else
tmp = t / ((a - z) / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+37) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 9.5e+40) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.6e+37: tmp = t + (((t - x) * (a - y)) / z) elif z <= 9.5e+40: tmp = x + ((t - x) / ((a - z) / y)) else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.6e+37) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (z <= 9.5e+40) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.6e+37) tmp = t + (((t - x) * (a - y)) / z); elseif (z <= 9.5e+40) tmp = x + ((t - x) / ((a - z) / y)); else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+37], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+40], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+37}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -3.59999999999999998e37Initial program 67.9%
Taylor expanded in z around inf 63.6%
+-commutative63.6%
associate--l+63.6%
associate-*r/63.6%
associate-*r/63.6%
div-sub63.6%
distribute-lft-out--63.6%
mul-1-neg63.6%
distribute-neg-frac63.6%
unsub-neg63.6%
distribute-rgt-out--65.6%
Simplified65.6%
if -3.59999999999999998e37 < z < 9.5000000000000003e40Initial program 94.9%
*-commutative94.9%
associate-*l/92.4%
associate-*r/95.7%
clear-num95.6%
un-div-inv95.7%
Applied egg-rr95.7%
Taylor expanded in y around inf 88.4%
if 9.5000000000000003e40 < z Initial program 66.4%
Taylor expanded in x around 0 36.6%
associate-/l*65.6%
Simplified65.6%
Final simplification77.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -64000.0)
t
(if (<= z -1.9e-58)
x
(if (<= z -1.6e-181)
(- (/ y (/ a x)))
(if (<= z 1.2e-191) (/ t (/ a y)) (if (<= z 4.5e+40) x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -64000.0) {
tmp = t;
} else if (z <= -1.9e-58) {
tmp = x;
} else if (z <= -1.6e-181) {
tmp = -(y / (a / x));
} else if (z <= 1.2e-191) {
tmp = t / (a / y);
} else if (z <= 4.5e+40) {
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 <= (-64000.0d0)) then
tmp = t
else if (z <= (-1.9d-58)) then
tmp = x
else if (z <= (-1.6d-181)) then
tmp = -(y / (a / x))
else if (z <= 1.2d-191) then
tmp = t / (a / y)
else if (z <= 4.5d+40) 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 <= -64000.0) {
tmp = t;
} else if (z <= -1.9e-58) {
tmp = x;
} else if (z <= -1.6e-181) {
tmp = -(y / (a / x));
} else if (z <= 1.2e-191) {
tmp = t / (a / y);
} else if (z <= 4.5e+40) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -64000.0: tmp = t elif z <= -1.9e-58: tmp = x elif z <= -1.6e-181: tmp = -(y / (a / x)) elif z <= 1.2e-191: tmp = t / (a / y) elif z <= 4.5e+40: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -64000.0) tmp = t; elseif (z <= -1.9e-58) tmp = x; elseif (z <= -1.6e-181) tmp = Float64(-Float64(y / Float64(a / x))); elseif (z <= 1.2e-191) tmp = Float64(t / Float64(a / y)); elseif (z <= 4.5e+40) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -64000.0) tmp = t; elseif (z <= -1.9e-58) tmp = x; elseif (z <= -1.6e-181) tmp = -(y / (a / x)); elseif (z <= 1.2e-191) tmp = t / (a / y); elseif (z <= 4.5e+40) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -64000.0], t, If[LessEqual[z, -1.9e-58], x, If[LessEqual[z, -1.6e-181], (-N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 1.2e-191], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+40], x, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -64000:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-181}:\\
\;\;\;\;-\frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-191}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -64000 or 4.50000000000000032e40 < z Initial program 68.1%
Taylor expanded in z around inf 47.9%
if -64000 < z < -1.8999999999999999e-58 or 1.2e-191 < z < 4.50000000000000032e40Initial program 96.2%
Taylor expanded in a around inf 48.1%
if -1.8999999999999999e-58 < z < -1.6000000000000001e-181Initial program 96.7%
Taylor expanded in x around inf 67.8%
mul-1-neg67.8%
unsub-neg67.8%
Simplified67.8%
Taylor expanded in z around 0 61.4%
Taylor expanded in y around inf 40.6%
mul-1-neg40.6%
associate-/l*40.5%
Simplified40.5%
if -1.6000000000000001e-181 < z < 1.2e-191Initial program 93.8%
Taylor expanded in x around 0 45.7%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in z around 0 48.1%
Final simplification47.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -0.00094)
t
(if (<= z -5.7e-56)
x
(if (<= z -5.6e-180)
(* x (/ (- y) a))
(if (<= z 9e-190) (/ t (/ a y)) (if (<= z 8e+40) x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.00094) {
tmp = t;
} else if (z <= -5.7e-56) {
tmp = x;
} else if (z <= -5.6e-180) {
tmp = x * (-y / a);
} else if (z <= 9e-190) {
tmp = t / (a / y);
} else if (z <= 8e+40) {
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 <= (-0.00094d0)) then
tmp = t
else if (z <= (-5.7d-56)) then
tmp = x
else if (z <= (-5.6d-180)) then
tmp = x * (-y / a)
else if (z <= 9d-190) then
tmp = t / (a / y)
else if (z <= 8d+40) 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 <= -0.00094) {
tmp = t;
} else if (z <= -5.7e-56) {
tmp = x;
} else if (z <= -5.6e-180) {
tmp = x * (-y / a);
} else if (z <= 9e-190) {
tmp = t / (a / y);
} else if (z <= 8e+40) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.00094: tmp = t elif z <= -5.7e-56: tmp = x elif z <= -5.6e-180: tmp = x * (-y / a) elif z <= 9e-190: tmp = t / (a / y) elif z <= 8e+40: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.00094) tmp = t; elseif (z <= -5.7e-56) tmp = x; elseif (z <= -5.6e-180) tmp = Float64(x * Float64(Float64(-y) / a)); elseif (z <= 9e-190) tmp = Float64(t / Float64(a / y)); elseif (z <= 8e+40) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.00094) tmp = t; elseif (z <= -5.7e-56) tmp = x; elseif (z <= -5.6e-180) tmp = x * (-y / a); elseif (z <= 9e-190) tmp = t / (a / y); elseif (z <= 8e+40) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.00094], t, If[LessEqual[z, -5.7e-56], x, If[LessEqual[z, -5.6e-180], N[(x * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-190], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+40], x, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00094:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \frac{-y}{a}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-190}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.39999999999999972e-4 or 8.00000000000000024e40 < z Initial program 68.1%
Taylor expanded in z around inf 47.9%
if -9.39999999999999972e-4 < z < -5.6999999999999998e-56 or 9.00000000000000042e-190 < z < 8.00000000000000024e40Initial program 96.2%
Taylor expanded in a around inf 48.1%
if -5.6999999999999998e-56 < z < -5.59999999999999994e-180Initial program 96.7%
Taylor expanded in x around inf 67.8%
mul-1-neg67.8%
unsub-neg67.8%
Simplified67.8%
Taylor expanded in z around 0 61.4%
Taylor expanded in y around inf 40.6%
mul-1-neg40.6%
distribute-neg-frac40.6%
distribute-lft-neg-out40.6%
associate-*l/40.6%
*-commutative40.6%
Simplified40.6%
if -5.59999999999999994e-180 < z < 9.00000000000000042e-190Initial program 93.8%
Taylor expanded in x around 0 45.7%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in z around 0 48.1%
Final simplification47.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -25500.0)
t
(if (<= z -2.7e-53)
x
(if (<= z -8.8e-181)
(/ (* x y) (- a))
(if (<= z 1.4e-190) (/ t (/ a y)) (if (<= z 8.2e+39) x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -25500.0) {
tmp = t;
} else if (z <= -2.7e-53) {
tmp = x;
} else if (z <= -8.8e-181) {
tmp = (x * y) / -a;
} else if (z <= 1.4e-190) {
tmp = t / (a / y);
} else if (z <= 8.2e+39) {
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 <= (-25500.0d0)) then
tmp = t
else if (z <= (-2.7d-53)) then
tmp = x
else if (z <= (-8.8d-181)) then
tmp = (x * y) / -a
else if (z <= 1.4d-190) then
tmp = t / (a / y)
else if (z <= 8.2d+39) 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 <= -25500.0) {
tmp = t;
} else if (z <= -2.7e-53) {
tmp = x;
} else if (z <= -8.8e-181) {
tmp = (x * y) / -a;
} else if (z <= 1.4e-190) {
tmp = t / (a / y);
} else if (z <= 8.2e+39) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -25500.0: tmp = t elif z <= -2.7e-53: tmp = x elif z <= -8.8e-181: tmp = (x * y) / -a elif z <= 1.4e-190: tmp = t / (a / y) elif z <= 8.2e+39: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -25500.0) tmp = t; elseif (z <= -2.7e-53) tmp = x; elseif (z <= -8.8e-181) tmp = Float64(Float64(x * y) / Float64(-a)); elseif (z <= 1.4e-190) tmp = Float64(t / Float64(a / y)); elseif (z <= 8.2e+39) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -25500.0) tmp = t; elseif (z <= -2.7e-53) tmp = x; elseif (z <= -8.8e-181) tmp = (x * y) / -a; elseif (z <= 1.4e-190) tmp = t / (a / y); elseif (z <= 8.2e+39) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -25500.0], t, If[LessEqual[z, -2.7e-53], x, If[LessEqual[z, -8.8e-181], N[(N[(x * y), $MachinePrecision] / (-a)), $MachinePrecision], If[LessEqual[z, 1.4e-190], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+39], x, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -25500:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-53}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-181}:\\
\;\;\;\;\frac{x \cdot y}{-a}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-190}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -25500 or 8.20000000000000008e39 < z Initial program 68.1%
Taylor expanded in z around inf 47.9%
if -25500 < z < -2.6999999999999999e-53 or 1.40000000000000003e-190 < z < 8.20000000000000008e39Initial program 96.2%
Taylor expanded in a around inf 48.1%
if -2.6999999999999999e-53 < z < -8.79999999999999988e-181Initial program 96.7%
Taylor expanded in x around inf 67.8%
mul-1-neg67.8%
unsub-neg67.8%
Simplified67.8%
Taylor expanded in z around 0 61.4%
Taylor expanded in y around inf 40.6%
mul-1-neg40.6%
distribute-neg-frac40.6%
distribute-lft-neg-out40.6%
associate-*l/40.6%
*-commutative40.6%
Simplified40.6%
associate-*r/40.6%
frac-2neg40.6%
add-sqr-sqrt12.4%
sqrt-unprod16.4%
sqr-neg16.4%
sqrt-unprod0.9%
add-sqr-sqrt4.9%
distribute-rgt-neg-out4.9%
add-sqr-sqrt3.9%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod28.2%
add-sqr-sqrt40.6%
Applied egg-rr40.6%
if -8.79999999999999988e-181 < z < 1.40000000000000003e-190Initial program 93.8%
Taylor expanded in x around 0 45.7%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in z around 0 48.1%
Final simplification47.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3e-168) (not (<= t 8.6e-99))) (* 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 ((t <= -3e-168) || !(t <= 8.6e-99)) {
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 ((t <= (-3d-168)) .or. (.not. (t <= 8.6d-99))) 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 ((t <= -3e-168) || !(t <= 8.6e-99)) {
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 (t <= -3e-168) or not (t <= 8.6e-99): 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 ((t <= -3e-168) || !(t <= 8.6e-99)) 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 ((t <= -3e-168) || ~((t <= 8.6e-99))) 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[t, -3e-168], N[Not[LessEqual[t, 8.6e-99]], $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}\;t \leq -3 \cdot 10^{-168} \lor \neg \left(t \leq 8.6 \cdot 10^{-99}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if t < -2.99999999999999991e-168 or 8.5999999999999998e-99 < t Initial program 85.9%
Taylor expanded in t around inf 66.6%
div-sub66.6%
Simplified66.6%
if -2.99999999999999991e-168 < t < 8.5999999999999998e-99Initial program 73.7%
Taylor expanded in x around inf 66.7%
mul-1-neg66.7%
unsub-neg66.7%
Simplified66.7%
Taylor expanded in z around 0 57.3%
Final simplification63.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.5e-16) (not (<= z 1.55e-39))) (* 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.5e-16) || !(z <= 1.55e-39)) {
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.5d-16)) .or. (.not. (z <= 1.55d-39))) 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.5e-16) || !(z <= 1.55e-39)) {
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.5e-16) or not (z <= 1.55e-39): 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.5e-16) || !(z <= 1.55e-39)) 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.5e-16) || ~((z <= 1.55e-39))) 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.5e-16], N[Not[LessEqual[z, 1.55e-39]], $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.5 \cdot 10^{-16} \lor \neg \left(z \leq 1.55 \cdot 10^{-39}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -2.5000000000000002e-16 or 1.54999999999999985e-39 < z Initial program 71.6%
Taylor expanded in t around inf 61.7%
div-sub61.7%
Simplified61.7%
if -2.5000000000000002e-16 < z < 1.54999999999999985e-39Initial program 94.8%
Taylor expanded in z around 0 79.4%
+-commutative79.4%
associate-/l*82.8%
Simplified82.8%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.45e-15) (* t (/ (- y z) (- a z))) (if (<= z 7.7e-38) (+ x (/ y (/ a (- t x)))) (/ t (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e-15) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 7.7e-38) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.45d-15)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 7.7d-38) then
tmp = x + (y / (a / (t - x)))
else
tmp = t / ((a - z) / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e-15) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 7.7e-38) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e-15: tmp = t * ((y - z) / (a - z)) elif z <= 7.7e-38: tmp = x + (y / (a / (t - x))) else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e-15) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 7.7e-38) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e-15) tmp = t * ((y - z) / (a - z)); elseif (z <= 7.7e-38) tmp = x + (y / (a / (t - x))); else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e-15], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.7e-38], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 7.7 \cdot 10^{-38}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -1.45000000000000009e-15Initial program 70.3%
Taylor expanded in t around inf 60.7%
div-sub60.7%
Simplified60.7%
if -1.45000000000000009e-15 < z < 7.6999999999999999e-38Initial program 94.8%
Taylor expanded in z around 0 79.4%
+-commutative79.4%
associate-/l*82.8%
Simplified82.8%
if 7.6999999999999999e-38 < z Initial program 72.7%
Taylor expanded in x around 0 39.1%
associate-/l*62.6%
Simplified62.6%
Final simplification71.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.0)
t
(if (<= z -9e-99)
x
(if (<= z 1.9e-191) (/ t (/ a y)) (if (<= z 1.25e+40) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.0) {
tmp = t;
} else if (z <= -9e-99) {
tmp = x;
} else if (z <= 1.9e-191) {
tmp = t / (a / y);
} else if (z <= 1.25e+40) {
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 <= (-6.0d0)) then
tmp = t
else if (z <= (-9d-99)) then
tmp = x
else if (z <= 1.9d-191) then
tmp = t / (a / y)
else if (z <= 1.25d+40) 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 <= -6.0) {
tmp = t;
} else if (z <= -9e-99) {
tmp = x;
} else if (z <= 1.9e-191) {
tmp = t / (a / y);
} else if (z <= 1.25e+40) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.0: tmp = t elif z <= -9e-99: tmp = x elif z <= 1.9e-191: tmp = t / (a / y) elif z <= 1.25e+40: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.0) tmp = t; elseif (z <= -9e-99) tmp = x; elseif (z <= 1.9e-191) tmp = Float64(t / Float64(a / y)); elseif (z <= 1.25e+40) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.0) tmp = t; elseif (z <= -9e-99) tmp = x; elseif (z <= 1.9e-191) tmp = t / (a / y); elseif (z <= 1.25e+40) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.0], t, If[LessEqual[z, -9e-99], x, If[LessEqual[z, 1.9e-191], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+40], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-99}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-191}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6 or 1.25000000000000001e40 < z Initial program 68.1%
Taylor expanded in z around inf 47.9%
if -6 < z < -9.0000000000000006e-99 or 1.8999999999999999e-191 < z < 1.25000000000000001e40Initial program 95.4%
Taylor expanded in a around inf 44.3%
if -9.0000000000000006e-99 < z < 1.8999999999999999e-191Initial program 95.5%
Taylor expanded in x around 0 38.0%
associate-/l*43.0%
Simplified43.0%
Taylor expanded in z around 0 41.1%
Final simplification45.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -510000.0) t (if (<= z 1.6e+40) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -510000.0) {
tmp = t;
} else if (z <= 1.6e+40) {
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 <= (-510000.0d0)) then
tmp = t
else if (z <= 1.6d+40) 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 <= -510000.0) {
tmp = t;
} else if (z <= 1.6e+40) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -510000.0: tmp = t elif z <= 1.6e+40: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -510000.0) tmp = t; elseif (z <= 1.6e+40) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -510000.0) tmp = t; elseif (z <= 1.6e+40) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -510000.0], t, If[LessEqual[z, 1.6e+40], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -510000:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.1e5 or 1.5999999999999999e40 < z Initial program 68.1%
Taylor expanded in z around inf 47.9%
if -5.1e5 < z < 1.5999999999999999e40Initial program 95.4%
Taylor expanded in a around inf 36.2%
Final simplification42.0%
(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 81.9%
Taylor expanded in z around inf 27.7%
Final simplification27.7%
herbie shell --seed 2023181
(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)))))