
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- y x) (- t z)) (- a t)))))
(if (<= t_1 -1e-262)
(+ x (/ (- y x) (/ (- a t) (- z t))))
(if (<= t_1 0.0)
(+ y (/ (* (- z a) (- x y)) t))
(fma (/ (- z t) (- a t)) (- y x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - x) * (t - z)) / (a - t));
double tmp;
if (t_1 <= -1e-262) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} else if (t_1 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else {
tmp = fma(((z - t) / (a - t)), (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y - x) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -1e-262) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); elseif (t_1 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); else tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-262], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-262}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000001e-262Initial program 76.4%
associate-/l*92.4%
Simplified92.4%
if -1.00000000000000001e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.4%
associate-/l*4.4%
Simplified4.4%
Taylor expanded in t around -inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
div-sub99.8%
*-commutative99.8%
div-sub99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 73.9%
+-commutative73.9%
associate-*r/94.9%
*-commutative94.9%
fma-def94.9%
Simplified94.9%
Final simplification94.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- y x) (- t z)) (- a t)))))
(if (<= t_1 (- INFINITY))
(* y (/ (- z t) (- a t)))
(if (<= t_1 -1e-262)
t_1
(if (<= t_1 0.0)
(+ y (/ (* (- z a) (- x y)) t))
(if (<= t_1 4e+300) t_1 (- x (/ (- t z) (/ (- a t) y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - x) * (t - z)) / (a - t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * ((z - t) / (a - t));
} else if (t_1 <= -1e-262) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_1 <= 4e+300) {
tmp = t_1;
} else {
tmp = x - ((t - z) / ((a - t) / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - x) * (t - z)) / (a - t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((z - t) / (a - t));
} else if (t_1 <= -1e-262) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_1 <= 4e+300) {
tmp = t_1;
} else {
tmp = x - ((t - z) / ((a - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((y - x) * (t - z)) / (a - t)) tmp = 0 if t_1 <= -math.inf: tmp = y * ((z - t) / (a - t)) elif t_1 <= -1e-262: tmp = t_1 elif t_1 <= 0.0: tmp = y + (((z - a) * (x - y)) / t) elif t_1 <= 4e+300: tmp = t_1 else: tmp = x - ((t - z) / ((a - t) / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y - x) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (t_1 <= -1e-262) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); elseif (t_1 <= 4e+300) tmp = t_1; else tmp = Float64(x - Float64(Float64(t - z) / Float64(Float64(a - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((y - x) * (t - z)) / (a - t)); tmp = 0.0; if (t_1 <= -Inf) tmp = y * ((z - t) / (a - t)); elseif (t_1 <= -1e-262) tmp = t_1; elseif (t_1 <= 0.0) tmp = y + (((z - a) * (x - y)) / t); elseif (t_1 <= 4e+300) tmp = t_1; else tmp = x - ((t - z) / ((a - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-262], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+300], t$95$1, N[(x - N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+300}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0Initial program 37.9%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in x around 0 30.9%
associate-*r/71.7%
Simplified71.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000001e-262 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 4.0000000000000002e300Initial program 97.3%
if -1.00000000000000001e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.4%
associate-/l*4.4%
Simplified4.4%
Taylor expanded in t around -inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
div-sub99.8%
*-commutative99.8%
div-sub99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 4.0000000000000002e300 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 34.7%
*-commutative34.7%
associate-/l*88.9%
Simplified88.9%
Taylor expanded in y around inf 68.4%
Final simplification88.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- y x) (- t z)) (- a t)))))
(if (or (<= t_1 -1e-262) (not (<= t_1 0.0)))
(+ x (/ (- y x) (/ (- a t) (- z t))))
(+ y (/ (* (- z a) (- x y)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - x) * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -1e-262) || !(t_1 <= 0.0)) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} else {
tmp = y + (((z - a) * (x - y)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (((y - x) * (t - z)) / (a - t))
if ((t_1 <= (-1d-262)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((y - x) / ((a - t) / (z - t)))
else
tmp = y + (((z - a) * (x - y)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - x) * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -1e-262) || !(t_1 <= 0.0)) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} else {
tmp = y + (((z - a) * (x - y)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((y - x) * (t - z)) / (a - t)) tmp = 0 if (t_1 <= -1e-262) or not (t_1 <= 0.0): tmp = x + ((y - x) / ((a - t) / (z - t))) else: tmp = y + (((z - a) * (x - y)) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y - x) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -1e-262) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); else tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((y - x) * (t - z)) / (a - t)); tmp = 0.0; if ((t_1 <= -1e-262) || ~((t_1 <= 0.0))) tmp = x + ((y - x) / ((a - t) / (z - t))); else tmp = y + (((z - a) * (x - y)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-262], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-262} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000001e-262 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 75.2%
associate-/l*93.6%
Simplified93.6%
if -1.00000000000000001e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.4%
associate-/l*4.4%
Simplified4.4%
Taylor expanded in t around -inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
div-sub99.8%
*-commutative99.8%
div-sub99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification94.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a z)))) (t_2 (* x (* (- z a) (/ 1.0 t)))))
(if (<= a -1.4e-55)
t_1
(if (<= a 1.3e-130)
(- y (* z (/ y t)))
(if (<= a 1.35e-102)
t_2
(if (<= a 3.9e-89)
(+ x (/ (* y z) a))
(if (<= a 5.5e-67)
(* x (- 1.0 (/ z a)))
(if (or (<= a 5e+51) (not (<= a 1e+81))) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / z));
double t_2 = x * ((z - a) * (1.0 / t));
double tmp;
if (a <= -1.4e-55) {
tmp = t_1;
} else if (a <= 1.3e-130) {
tmp = y - (z * (y / t));
} else if (a <= 1.35e-102) {
tmp = t_2;
} else if (a <= 3.9e-89) {
tmp = x + ((y * z) / a);
} else if (a <= 5.5e-67) {
tmp = x * (1.0 - (z / a));
} else if ((a <= 5e+51) || !(a <= 1e+81)) {
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 + (y / (a / z))
t_2 = x * ((z - a) * (1.0d0 / t))
if (a <= (-1.4d-55)) then
tmp = t_1
else if (a <= 1.3d-130) then
tmp = y - (z * (y / t))
else if (a <= 1.35d-102) then
tmp = t_2
else if (a <= 3.9d-89) then
tmp = x + ((y * z) / a)
else if (a <= 5.5d-67) then
tmp = x * (1.0d0 - (z / a))
else if ((a <= 5d+51) .or. (.not. (a <= 1d+81))) 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 + (y / (a / z));
double t_2 = x * ((z - a) * (1.0 / t));
double tmp;
if (a <= -1.4e-55) {
tmp = t_1;
} else if (a <= 1.3e-130) {
tmp = y - (z * (y / t));
} else if (a <= 1.35e-102) {
tmp = t_2;
} else if (a <= 3.9e-89) {
tmp = x + ((y * z) / a);
} else if (a <= 5.5e-67) {
tmp = x * (1.0 - (z / a));
} else if ((a <= 5e+51) || !(a <= 1e+81)) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / z)) t_2 = x * ((z - a) * (1.0 / t)) tmp = 0 if a <= -1.4e-55: tmp = t_1 elif a <= 1.3e-130: tmp = y - (z * (y / t)) elif a <= 1.35e-102: tmp = t_2 elif a <= 3.9e-89: tmp = x + ((y * z) / a) elif a <= 5.5e-67: tmp = x * (1.0 - (z / a)) elif (a <= 5e+51) or not (a <= 1e+81): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / z))) t_2 = Float64(x * Float64(Float64(z - a) * Float64(1.0 / t))) tmp = 0.0 if (a <= -1.4e-55) tmp = t_1; elseif (a <= 1.3e-130) tmp = Float64(y - Float64(z * Float64(y / t))); elseif (a <= 1.35e-102) tmp = t_2; elseif (a <= 3.9e-89) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (a <= 5.5e-67) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif ((a <= 5e+51) || !(a <= 1e+81)) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / z)); t_2 = x * ((z - a) * (1.0 / t)); tmp = 0.0; if (a <= -1.4e-55) tmp = t_1; elseif (a <= 1.3e-130) tmp = y - (z * (y / t)); elseif (a <= 1.35e-102) tmp = t_2; elseif (a <= 3.9e-89) tmp = x + ((y * z) / a); elseif (a <= 5.5e-67) tmp = x * (1.0 - (z / a)); elseif ((a <= 5e+51) || ~((a <= 1e+81))) 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[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(z - a), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e-55], t$95$1, If[LessEqual[a, 1.3e-130], N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e-102], t$95$2, If[LessEqual[a, 3.9e-89], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-67], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5e+51], N[Not[LessEqual[a, 1e+81]], $MachinePrecision]], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z}}\\
t_2 := x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-130}:\\
\;\;\;\;y - z \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+51} \lor \neg \left(a \leq 10^{+81}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.39999999999999992e-55 or 5.5000000000000003e-67 < a < 5e51 or 9.99999999999999921e80 < a Initial program 74.1%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in a around inf 78.2%
Taylor expanded in x around 0 65.2%
Taylor expanded in t around 0 59.0%
associate-/l*63.1%
Simplified63.1%
if -1.39999999999999992e-55 < a < 1.3e-130Initial program 66.4%
associate-/l*83.1%
Simplified83.1%
associate-/l*66.4%
div-inv66.3%
*-commutative66.3%
associate-*r*81.5%
div-inv81.6%
clear-num81.5%
div-inv81.7%
associate-/r/83.1%
div-inv82.9%
associate-*l*81.5%
Applied egg-rr81.5%
Taylor expanded in x around 0 54.6%
*-commutative54.6%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in a around 0 63.9%
mul-1-neg63.9%
distribute-neg-frac63.9%
Simplified63.9%
Taylor expanded in z around 0 62.8%
+-commutative62.8%
mul-1-neg62.8%
*-commutative62.8%
associate-*r/66.1%
unsub-neg66.1%
Simplified66.1%
if 1.3e-130 < a < 1.35e-102 or 5e51 < a < 9.99999999999999921e80Initial program 36.0%
associate-/l*47.0%
Simplified47.0%
Taylor expanded in x around -inf 54.2%
mul-1-neg54.2%
distribute-rgt-neg-in54.2%
Simplified54.2%
Taylor expanded in t around -inf 61.6%
div-inv61.1%
*-commutative61.1%
associate-*l*79.1%
Applied egg-rr79.1%
if 1.35e-102 < a < 3.89999999999999978e-89Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in y around inf 100.0%
if 3.89999999999999978e-89 < a < 5.5000000000000003e-67Initial program 89.0%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around 0 74.9%
Taylor expanded in x around inf 75.3%
*-commutative75.3%
mul-1-neg75.3%
unsub-neg75.3%
Simplified75.3%
Final simplification65.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ x (* (- z t) (/ y a)))))
(if (<= a -2.8e+54)
t_2
(if (<= a -9.2e+39)
t_1
(if (<= a -0.26)
t_2
(if (<= a -1e-104)
(* z (/ (- y x) (- a t)))
(if (<= a 1.3e-130)
t_1
(if (<= a 2.5e-72)
(* x (* (- z a) (/ 1.0 t)))
(if (<= a 5.1e+75) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double t_2 = x + ((z - t) * (y / a));
double tmp;
if (a <= -2.8e+54) {
tmp = t_2;
} else if (a <= -9.2e+39) {
tmp = t_1;
} else if (a <= -0.26) {
tmp = t_2;
} else if (a <= -1e-104) {
tmp = z * ((y - x) / (a - t));
} else if (a <= 1.3e-130) {
tmp = t_1;
} else if (a <= 2.5e-72) {
tmp = x * ((z - a) * (1.0 / t));
} else if (a <= 5.1e+75) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
t_2 = x + ((z - t) * (y / a))
if (a <= (-2.8d+54)) then
tmp = t_2
else if (a <= (-9.2d+39)) then
tmp = t_1
else if (a <= (-0.26d0)) then
tmp = t_2
else if (a <= (-1d-104)) then
tmp = z * ((y - x) / (a - t))
else if (a <= 1.3d-130) then
tmp = t_1
else if (a <= 2.5d-72) then
tmp = x * ((z - a) * (1.0d0 / t))
else if (a <= 5.1d+75) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double t_2 = x + ((z - t) * (y / a));
double tmp;
if (a <= -2.8e+54) {
tmp = t_2;
} else if (a <= -9.2e+39) {
tmp = t_1;
} else if (a <= -0.26) {
tmp = t_2;
} else if (a <= -1e-104) {
tmp = z * ((y - x) / (a - t));
} else if (a <= 1.3e-130) {
tmp = t_1;
} else if (a <= 2.5e-72) {
tmp = x * ((z - a) * (1.0 / t));
} else if (a <= 5.1e+75) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) t_2 = x + ((z - t) * (y / a)) tmp = 0 if a <= -2.8e+54: tmp = t_2 elif a <= -9.2e+39: tmp = t_1 elif a <= -0.26: tmp = t_2 elif a <= -1e-104: tmp = z * ((y - x) / (a - t)) elif a <= 1.3e-130: tmp = t_1 elif a <= 2.5e-72: tmp = x * ((z - a) * (1.0 / t)) elif a <= 5.1e+75: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) t_2 = Float64(x + Float64(Float64(z - t) * Float64(y / a))) tmp = 0.0 if (a <= -2.8e+54) tmp = t_2; elseif (a <= -9.2e+39) tmp = t_1; elseif (a <= -0.26) tmp = t_2; elseif (a <= -1e-104) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); elseif (a <= 1.3e-130) tmp = t_1; elseif (a <= 2.5e-72) tmp = Float64(x * Float64(Float64(z - a) * Float64(1.0 / t))); elseif (a <= 5.1e+75) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); t_2 = x + ((z - t) * (y / a)); tmp = 0.0; if (a <= -2.8e+54) tmp = t_2; elseif (a <= -9.2e+39) tmp = t_1; elseif (a <= -0.26) tmp = t_2; elseif (a <= -1e-104) tmp = z * ((y - x) / (a - t)); elseif (a <= 1.3e-130) tmp = t_1; elseif (a <= 2.5e-72) tmp = x * ((z - a) * (1.0 / t)); elseif (a <= 5.1e+75) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.8e+54], t$95$2, If[LessEqual[a, -9.2e+39], t$95$1, If[LessEqual[a, -0.26], t$95$2, If[LessEqual[a, -1e-104], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-130], t$95$1, If[LessEqual[a, 2.5e-72], N[(x * N[(N[(z - a), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.1e+75], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
t_2 := x + \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -0.26:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-104}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-72}:\\
\;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -2.80000000000000015e54 or -9.20000000000000047e39 < a < -0.26000000000000001 or 5.10000000000000037e75 < a Initial program 72.7%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in a around inf 85.2%
Taylor expanded in y around inf 71.1%
associate-/l*80.7%
associate-/r/77.9%
Simplified77.9%
if -2.80000000000000015e54 < a < -9.20000000000000047e39 or -9.99999999999999927e-105 < a < 1.3e-130 or 2.4999999999999998e-72 < a < 5.10000000000000037e75Initial program 64.4%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in x around 0 55.1%
associate-*r/76.3%
Simplified76.3%
if -0.26000000000000001 < a < -9.99999999999999927e-105Initial program 76.7%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in z around inf 56.9%
div-sub56.9%
Simplified56.9%
if 1.3e-130 < a < 2.4999999999999998e-72Initial program 74.4%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in x around -inf 62.8%
mul-1-neg62.8%
distribute-rgt-neg-in62.8%
Simplified62.8%
Taylor expanded in t around -inf 52.9%
div-inv52.4%
*-commutative52.4%
associate-*l*59.7%
Applied egg-rr59.7%
Final simplification73.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))) (t_2 (* y (/ z (- a t)))))
(if (<= y -2.4e+230)
y
(if (<= y -1.25e+163)
t_2
(if (<= y -6e+64)
y
(if (<= y 1.8e-235)
t_1
(if (<= y 1.7e-163)
(* x (/ z t))
(if (<= y 7e-24) t_1 (if (<= y 9e+220) t_2 y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double t_2 = y * (z / (a - t));
double tmp;
if (y <= -2.4e+230) {
tmp = y;
} else if (y <= -1.25e+163) {
tmp = t_2;
} else if (y <= -6e+64) {
tmp = y;
} else if (y <= 1.8e-235) {
tmp = t_1;
} else if (y <= 1.7e-163) {
tmp = x * (z / t);
} else if (y <= 7e-24) {
tmp = t_1;
} else if (y <= 9e+220) {
tmp = t_2;
} else {
tmp = 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (1.0d0 - (z / a))
t_2 = y * (z / (a - t))
if (y <= (-2.4d+230)) then
tmp = y
else if (y <= (-1.25d+163)) then
tmp = t_2
else if (y <= (-6d+64)) then
tmp = y
else if (y <= 1.8d-235) then
tmp = t_1
else if (y <= 1.7d-163) then
tmp = x * (z / t)
else if (y <= 7d-24) then
tmp = t_1
else if (y <= 9d+220) then
tmp = t_2
else
tmp = y
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 - (z / a));
double t_2 = y * (z / (a - t));
double tmp;
if (y <= -2.4e+230) {
tmp = y;
} else if (y <= -1.25e+163) {
tmp = t_2;
} else if (y <= -6e+64) {
tmp = y;
} else if (y <= 1.8e-235) {
tmp = t_1;
} else if (y <= 1.7e-163) {
tmp = x * (z / t);
} else if (y <= 7e-24) {
tmp = t_1;
} else if (y <= 9e+220) {
tmp = t_2;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) t_2 = y * (z / (a - t)) tmp = 0 if y <= -2.4e+230: tmp = y elif y <= -1.25e+163: tmp = t_2 elif y <= -6e+64: tmp = y elif y <= 1.8e-235: tmp = t_1 elif y <= 1.7e-163: tmp = x * (z / t) elif y <= 7e-24: tmp = t_1 elif y <= 9e+220: tmp = t_2 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) t_2 = Float64(y * Float64(z / Float64(a - t))) tmp = 0.0 if (y <= -2.4e+230) tmp = y; elseif (y <= -1.25e+163) tmp = t_2; elseif (y <= -6e+64) tmp = y; elseif (y <= 1.8e-235) tmp = t_1; elseif (y <= 1.7e-163) tmp = Float64(x * Float64(z / t)); elseif (y <= 7e-24) tmp = t_1; elseif (y <= 9e+220) tmp = t_2; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); t_2 = y * (z / (a - t)); tmp = 0.0; if (y <= -2.4e+230) tmp = y; elseif (y <= -1.25e+163) tmp = t_2; elseif (y <= -6e+64) tmp = y; elseif (y <= 1.8e-235) tmp = t_1; elseif (y <= 1.7e-163) tmp = x * (z / t); elseif (y <= 7e-24) tmp = t_1; elseif (y <= 9e+220) tmp = t_2; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+230], y, If[LessEqual[y, -1.25e+163], t$95$2, If[LessEqual[y, -6e+64], y, If[LessEqual[y, 1.8e-235], t$95$1, If[LessEqual[y, 1.7e-163], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-24], t$95$1, If[LessEqual[y, 9e+220], t$95$2, y]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
t_2 := y \cdot \frac{z}{a - t}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+230}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{+163}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -6 \cdot 10^{+64}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-235}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-163}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+220}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -2.39999999999999998e230 or -1.25e163 < y < -6.0000000000000004e64 or 9.00000000000000022e220 < y Initial program 53.3%
associate-/l*94.6%
Simplified94.6%
Taylor expanded in t around inf 54.4%
if -2.39999999999999998e230 < y < -1.25e163 or 6.9999999999999993e-24 < y < 9.00000000000000022e220Initial program 79.2%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in x around 0 58.1%
associate-*r/73.9%
Simplified73.9%
Taylor expanded in z around inf 55.2%
if -6.0000000000000004e64 < y < 1.79999999999999999e-235 or 1.70000000000000007e-163 < y < 6.9999999999999993e-24Initial program 75.9%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in t around 0 63.4%
Taylor expanded in x around inf 59.4%
*-commutative59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
if 1.79999999999999999e-235 < y < 1.70000000000000007e-163Initial program 53.9%
associate-/l*60.4%
Simplified60.4%
Taylor expanded in x around -inf 65.9%
mul-1-neg65.9%
distribute-rgt-neg-in65.9%
Simplified65.9%
Taylor expanded in a around 0 43.2%
associate-/l*43.3%
associate-/r/49.0%
Applied egg-rr49.0%
Final simplification56.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= y -1.8e+64)
t_1
(if (<= y -1.4e+33)
(* x (- 1.0 (/ z a)))
(if (or (<= y -5.2e-41) (not (<= y 3.1e-22)))
t_1
(* x (+ (/ (- t z) (- a t)) 1.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -1.8e+64) {
tmp = t_1;
} else if (y <= -1.4e+33) {
tmp = x * (1.0 - (z / a));
} else if ((y <= -5.2e-41) || !(y <= 3.1e-22)) {
tmp = t_1;
} else {
tmp = x * (((t - z) / (a - t)) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
if (y <= (-1.8d+64)) then
tmp = t_1
else if (y <= (-1.4d+33)) then
tmp = x * (1.0d0 - (z / a))
else if ((y <= (-5.2d-41)) .or. (.not. (y <= 3.1d-22))) then
tmp = t_1
else
tmp = x * (((t - z) / (a - t)) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -1.8e+64) {
tmp = t_1;
} else if (y <= -1.4e+33) {
tmp = x * (1.0 - (z / a));
} else if ((y <= -5.2e-41) || !(y <= 3.1e-22)) {
tmp = t_1;
} else {
tmp = x * (((t - z) / (a - t)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if y <= -1.8e+64: tmp = t_1 elif y <= -1.4e+33: tmp = x * (1.0 - (z / a)) elif (y <= -5.2e-41) or not (y <= 3.1e-22): tmp = t_1 else: tmp = x * (((t - z) / (a - t)) + 1.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (y <= -1.8e+64) tmp = t_1; elseif (y <= -1.4e+33) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif ((y <= -5.2e-41) || !(y <= 3.1e-22)) tmp = t_1; else tmp = Float64(x * Float64(Float64(Float64(t - z) / Float64(a - t)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (y <= -1.8e+64) tmp = t_1; elseif (y <= -1.4e+33) tmp = x * (1.0 - (z / a)); elseif ((y <= -5.2e-41) || ~((y <= 3.1e-22))) tmp = t_1; else tmp = x * (((t - z) / (a - t)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+64], t$95$1, If[LessEqual[y, -1.4e+33], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.2e-41], N[Not[LessEqual[y, 3.1e-22]], $MachinePrecision]], t$95$1, N[(x * N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-41} \lor \neg \left(y \leq 3.1 \cdot 10^{-22}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\
\end{array}
\end{array}
if y < -1.80000000000000007e64 or -1.4e33 < y < -5.1999999999999999e-41 or 3.10000000000000013e-22 < y Initial program 67.5%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in x around 0 53.9%
associate-*r/80.9%
Simplified80.9%
if -1.80000000000000007e64 < y < -1.4e33Initial program 75.3%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in t around 0 76.3%
Taylor expanded in x around inf 77.0%
*-commutative77.0%
mul-1-neg77.0%
unsub-neg77.0%
Simplified77.0%
if -5.1999999999999999e-41 < y < 3.10000000000000013e-22Initial program 72.1%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in x around inf 62.7%
mul-1-neg62.7%
unsub-neg62.7%
Simplified62.7%
Final simplification72.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -8.4e-73)
(- x (/ (- t z) (/ (- a t) y)))
(if (<= a 2e-101)
(+ y (/ (* (- z a) (- x y)) t))
(if (<= a 1.22e+55)
(+ x (/ (- y x) (/ a z)))
(if (<= a 7.1e+80)
(* x (* (- z a) (/ 1.0 t)))
(+ x (/ (- y x) (/ a (- z t)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.4e-73) {
tmp = x - ((t - z) / ((a - t) / y));
} else if (a <= 2e-101) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (a <= 1.22e+55) {
tmp = x + ((y - x) / (a / z));
} else if (a <= 7.1e+80) {
tmp = x * ((z - a) * (1.0 / t));
} else {
tmp = x + ((y - x) / (a / (z - 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 (a <= (-8.4d-73)) then
tmp = x - ((t - z) / ((a - t) / y))
else if (a <= 2d-101) then
tmp = y + (((z - a) * (x - y)) / t)
else if (a <= 1.22d+55) then
tmp = x + ((y - x) / (a / z))
else if (a <= 7.1d+80) then
tmp = x * ((z - a) * (1.0d0 / t))
else
tmp = x + ((y - x) / (a / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.4e-73) {
tmp = x - ((t - z) / ((a - t) / y));
} else if (a <= 2e-101) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (a <= 1.22e+55) {
tmp = x + ((y - x) / (a / z));
} else if (a <= 7.1e+80) {
tmp = x * ((z - a) * (1.0 / t));
} else {
tmp = x + ((y - x) / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.4e-73: tmp = x - ((t - z) / ((a - t) / y)) elif a <= 2e-101: tmp = y + (((z - a) * (x - y)) / t) elif a <= 1.22e+55: tmp = x + ((y - x) / (a / z)) elif a <= 7.1e+80: tmp = x * ((z - a) * (1.0 / t)) else: tmp = x + ((y - x) / (a / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.4e-73) tmp = Float64(x - Float64(Float64(t - z) / Float64(Float64(a - t) / y))); elseif (a <= 2e-101) tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); elseif (a <= 1.22e+55) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); elseif (a <= 7.1e+80) tmp = Float64(x * Float64(Float64(z - a) * Float64(1.0 / t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.4e-73) tmp = x - ((t - z) / ((a - t) / y)); elseif (a <= 2e-101) tmp = y + (((z - a) * (x - y)) / t); elseif (a <= 1.22e+55) tmp = x + ((y - x) / (a / z)); elseif (a <= 7.1e+80) tmp = x * ((z - a) * (1.0 / t)); else tmp = x + ((y - x) / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.4e-73], N[(x - N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-101], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.22e+55], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.1e+80], N[(x * N[(N[(z - a), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.4 \cdot 10^{-73}:\\
\;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-101}:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;a \leq 1.22 \cdot 10^{+55}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 7.1 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if a < -8.3999999999999994e-73Initial program 69.9%
*-commutative69.9%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in y around inf 74.7%
if -8.3999999999999994e-73 < a < 2.0000000000000001e-101Initial program 65.7%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
unsub-neg82.9%
div-sub82.8%
*-commutative82.8%
div-sub82.9%
distribute-rgt-out--82.9%
Simplified82.9%
if 2.0000000000000001e-101 < a < 1.22e55Initial program 80.9%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around 0 68.1%
if 1.22e55 < a < 7.09999999999999988e80Initial program 4.2%
associate-/l*15.9%
Simplified15.9%
Taylor expanded in x around -inf 51.1%
mul-1-neg51.1%
distribute-rgt-neg-in51.1%
Simplified51.1%
Taylor expanded in t around -inf 52.6%
div-inv52.3%
*-commutative52.3%
associate-*l*81.0%
Applied egg-rr81.0%
if 7.09999999999999988e80 < a Initial program 78.2%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in a around inf 93.1%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= a -1.35e-104)
t_1
(if (<= a 3.6e-142)
y
(if (<= a 5.8e-104)
(* x (/ z t))
(if (or (<= a 4.8e-33) (not (<= a 2.7e+32))) t_1 (* y (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (a <= -1.35e-104) {
tmp = t_1;
} else if (a <= 3.6e-142) {
tmp = y;
} else if (a <= 5.8e-104) {
tmp = x * (z / t);
} else if ((a <= 4.8e-33) || !(a <= 2.7e+32)) {
tmp = t_1;
} else {
tmp = y * (z / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (z / a))
if (a <= (-1.35d-104)) then
tmp = t_1
else if (a <= 3.6d-142) then
tmp = y
else if (a <= 5.8d-104) then
tmp = x * (z / t)
else if ((a <= 4.8d-33) .or. (.not. (a <= 2.7d+32))) then
tmp = t_1
else
tmp = y * (z / a)
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 - (z / a));
double tmp;
if (a <= -1.35e-104) {
tmp = t_1;
} else if (a <= 3.6e-142) {
tmp = y;
} else if (a <= 5.8e-104) {
tmp = x * (z / t);
} else if ((a <= 4.8e-33) || !(a <= 2.7e+32)) {
tmp = t_1;
} else {
tmp = y * (z / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if a <= -1.35e-104: tmp = t_1 elif a <= 3.6e-142: tmp = y elif a <= 5.8e-104: tmp = x * (z / t) elif (a <= 4.8e-33) or not (a <= 2.7e+32): tmp = t_1 else: tmp = y * (z / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (a <= -1.35e-104) tmp = t_1; elseif (a <= 3.6e-142) tmp = y; elseif (a <= 5.8e-104) tmp = Float64(x * Float64(z / t)); elseif ((a <= 4.8e-33) || !(a <= 2.7e+32)) tmp = t_1; else tmp = Float64(y * Float64(z / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (a <= -1.35e-104) tmp = t_1; elseif (a <= 3.6e-142) tmp = y; elseif (a <= 5.8e-104) tmp = x * (z / t); elseif ((a <= 4.8e-33) || ~((a <= 2.7e+32))) tmp = t_1; else tmp = y * (z / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e-104], t$95$1, If[LessEqual[a, 3.6e-142], y, If[LessEqual[a, 5.8e-104], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 4.8e-33], N[Not[LessEqual[a, 2.7e+32]], $MachinePrecision]], t$95$1, N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-142}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-104}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-33} \lor \neg \left(a \leq 2.7 \cdot 10^{+32}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -1.3499999999999999e-104 or 5.8000000000000002e-104 < a < 4.8e-33 or 2.70000000000000013e32 < a Initial program 71.9%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in t around 0 65.8%
Taylor expanded in x around inf 51.7%
*-commutative51.7%
mul-1-neg51.7%
unsub-neg51.7%
Simplified51.7%
if -1.3499999999999999e-104 < a < 3.6e-142Initial program 64.6%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in t around inf 53.6%
if 3.6e-142 < a < 5.8000000000000002e-104Initial program 67.9%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in x around -inf 56.4%
mul-1-neg56.4%
distribute-rgt-neg-in56.4%
Simplified56.4%
Taylor expanded in a around 0 57.0%
associate-/l*46.2%
associate-/r/67.6%
Applied egg-rr67.6%
if 4.8e-33 < a < 2.70000000000000013e32Initial program 74.4%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in t around 0 64.9%
Taylor expanded in y around inf 64.5%
Taylor expanded in x around 0 57.0%
associate-*r/57.1%
Simplified57.1%
Final simplification53.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -6.8e+125)
(- x (/ z (/ a x)))
(if (or (<= x -5e+38) (and (not (<= x -1.1e-105)) (<= x 3e-44)))
(* y (/ (- z t) (- a t)))
(* x (- 1.0 (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.8e+125) {
tmp = x - (z / (a / x));
} else if ((x <= -5e+38) || (!(x <= -1.1e-105) && (x <= 3e-44))) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x * (1.0 - (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-6.8d+125)) then
tmp = x - (z / (a / x))
else if ((x <= (-5d+38)) .or. (.not. (x <= (-1.1d-105))) .and. (x <= 3d-44)) then
tmp = y * ((z - t) / (a - t))
else
tmp = x * (1.0d0 - (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.8e+125) {
tmp = x - (z / (a / x));
} else if ((x <= -5e+38) || (!(x <= -1.1e-105) && (x <= 3e-44))) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.8e+125: tmp = x - (z / (a / x)) elif (x <= -5e+38) or (not (x <= -1.1e-105) and (x <= 3e-44)): tmp = y * ((z - t) / (a - t)) else: tmp = x * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.8e+125) tmp = Float64(x - Float64(z / Float64(a / x))); elseif ((x <= -5e+38) || (!(x <= -1.1e-105) && (x <= 3e-44))) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x * Float64(1.0 - Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.8e+125) tmp = x - (z / (a / x)); elseif ((x <= -5e+38) || (~((x <= -1.1e-105)) && (x <= 3e-44))) tmp = y * ((z - t) / (a - t)); else tmp = x * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.8e+125], N[(x - N[(z / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -5e+38], And[N[Not[LessEqual[x, -1.1e-105]], $MachinePrecision], LessEqual[x, 3e-44]]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+125}:\\
\;\;\;\;x - \frac{z}{\frac{a}{x}}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{+38} \lor \neg \left(x \leq -1.1 \cdot 10^{-105}\right) \land x \leq 3 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if x < -6.7999999999999998e125Initial program 63.5%
associate-/l*85.6%
Simplified85.6%
Taylor expanded in t around 0 74.4%
Taylor expanded in y around 0 57.3%
+-commutative57.3%
mul-1-neg57.3%
unsub-neg57.3%
associate-/l*71.3%
Simplified71.3%
if -6.7999999999999998e125 < x < -4.9999999999999997e38 or -1.10000000000000002e-105 < x < 3.0000000000000002e-44Initial program 71.0%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in x around 0 55.7%
associate-*r/75.6%
Simplified75.6%
if -4.9999999999999997e38 < x < -1.10000000000000002e-105 or 3.0000000000000002e-44 < x Initial program 70.7%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t around 0 54.6%
Taylor expanded in x around inf 51.8%
*-commutative51.8%
mul-1-neg51.8%
unsub-neg51.8%
Simplified51.8%
Final simplification66.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ z (/ a (- y x))))) (t_2 (* y (/ (- z t) (- a t)))))
(if (<= y -1.95e+64)
t_2
(if (<= y 2.65e-235)
t_1
(if (<= y 1.8e-163)
(* x (* (- z a) (/ 1.0 t)))
(if (<= y 1e-26) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z / (a / (y - x)));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (y <= -1.95e+64) {
tmp = t_2;
} else if (y <= 2.65e-235) {
tmp = t_1;
} else if (y <= 1.8e-163) {
tmp = x * ((z - a) * (1.0 / t));
} else if (y <= 1e-26) {
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 + (z / (a / (y - x)))
t_2 = y * ((z - t) / (a - t))
if (y <= (-1.95d+64)) then
tmp = t_2
else if (y <= 2.65d-235) then
tmp = t_1
else if (y <= 1.8d-163) then
tmp = x * ((z - a) * (1.0d0 / t))
else if (y <= 1d-26) 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 + (z / (a / (y - x)));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (y <= -1.95e+64) {
tmp = t_2;
} else if (y <= 2.65e-235) {
tmp = t_1;
} else if (y <= 1.8e-163) {
tmp = x * ((z - a) * (1.0 / t));
} else if (y <= 1e-26) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z / (a / (y - x))) t_2 = y * ((z - t) / (a - t)) tmp = 0 if y <= -1.95e+64: tmp = t_2 elif y <= 2.65e-235: tmp = t_1 elif y <= 1.8e-163: tmp = x * ((z - a) * (1.0 / t)) elif y <= 1e-26: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x)))) t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (y <= -1.95e+64) tmp = t_2; elseif (y <= 2.65e-235) tmp = t_1; elseif (y <= 1.8e-163) tmp = Float64(x * Float64(Float64(z - a) * Float64(1.0 / t))); elseif (y <= 1e-26) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z / (a / (y - x))); t_2 = y * ((z - t) / (a - t)); tmp = 0.0; if (y <= -1.95e+64) tmp = t_2; elseif (y <= 2.65e-235) tmp = t_1; elseif (y <= 1.8e-163) tmp = x * ((z - a) * (1.0 / t)); elseif (y <= 1e-26) 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[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.95e+64], t$95$2, If[LessEqual[y, 2.65e-235], t$95$1, If[LessEqual[y, 1.8e-163], N[(x * N[(N[(z - a), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-26], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y - x}}\\
t_2 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{-235}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-163}:\\
\;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\
\mathbf{elif}\;y \leq 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.9499999999999999e64 or 1e-26 < y Initial program 66.2%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in x around 0 51.7%
associate-*r/80.5%
Simplified80.5%
if -1.9499999999999999e64 < y < 2.6500000000000001e-235 or 1.7999999999999999e-163 < y < 1e-26Initial program 75.9%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in t around 0 59.5%
+-commutative59.5%
*-commutative59.5%
associate-/l*62.6%
Simplified62.6%
if 2.6500000000000001e-235 < y < 1.7999999999999999e-163Initial program 53.9%
associate-/l*60.4%
Simplified60.4%
Taylor expanded in x around -inf 65.9%
mul-1-neg65.9%
distribute-rgt-neg-in65.9%
Simplified65.9%
Taylor expanded in t around -inf 49.7%
div-inv49.9%
*-commutative49.9%
associate-*l*61.2%
Applied egg-rr61.2%
Final simplification70.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= y -3.8e+64)
t_1
(if (<= y 1e-236)
(+ x (/ (- y x) (/ a z)))
(if (<= y 1.9e-163)
(* x (* (- z a) (/ 1.0 t)))
(if (<= y 9e-23) (+ x (/ z (/ a (- y x)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -3.8e+64) {
tmp = t_1;
} else if (y <= 1e-236) {
tmp = x + ((y - x) / (a / z));
} else if (y <= 1.9e-163) {
tmp = x * ((z - a) * (1.0 / t));
} else if (y <= 9e-23) {
tmp = x + (z / (a / (y - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
if (y <= (-3.8d+64)) then
tmp = t_1
else if (y <= 1d-236) then
tmp = x + ((y - x) / (a / z))
else if (y <= 1.9d-163) then
tmp = x * ((z - a) * (1.0d0 / t))
else if (y <= 9d-23) then
tmp = x + (z / (a / (y - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -3.8e+64) {
tmp = t_1;
} else if (y <= 1e-236) {
tmp = x + ((y - x) / (a / z));
} else if (y <= 1.9e-163) {
tmp = x * ((z - a) * (1.0 / t));
} else if (y <= 9e-23) {
tmp = x + (z / (a / (y - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if y <= -3.8e+64: tmp = t_1 elif y <= 1e-236: tmp = x + ((y - x) / (a / z)) elif y <= 1.9e-163: tmp = x * ((z - a) * (1.0 / t)) elif y <= 9e-23: tmp = x + (z / (a / (y - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (y <= -3.8e+64) tmp = t_1; elseif (y <= 1e-236) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); elseif (y <= 1.9e-163) tmp = Float64(x * Float64(Float64(z - a) * Float64(1.0 / t))); elseif (y <= 9e-23) tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (y <= -3.8e+64) tmp = t_1; elseif (y <= 1e-236) tmp = x + ((y - x) / (a / z)); elseif (y <= 1.9e-163) tmp = x * ((z - a) * (1.0 / t)); elseif (y <= 9e-23) tmp = x + (z / (a / (y - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+64], t$95$1, If[LessEqual[y, 1e-236], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-163], N[(x * N[(N[(z - a), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-23], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 10^{-236}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-163}:\\
\;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-23}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.8000000000000001e64 or 8.9999999999999995e-23 < y Initial program 66.2%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in x around 0 51.7%
associate-*r/80.5%
Simplified80.5%
if -3.8000000000000001e64 < y < 1e-236Initial program 73.0%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in t around 0 61.5%
if 1e-236 < y < 1.9e-163Initial program 53.9%
associate-/l*60.4%
Simplified60.4%
Taylor expanded in x around -inf 65.9%
mul-1-neg65.9%
distribute-rgt-neg-in65.9%
Simplified65.9%
Taylor expanded in t around -inf 49.7%
div-inv49.9%
*-commutative49.9%
associate-*l*61.2%
Applied egg-rr61.2%
if 1.9e-163 < y < 8.9999999999999995e-23Initial program 84.1%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in t around 0 65.7%
+-commutative65.7%
*-commutative65.7%
associate-/l*68.9%
Simplified68.9%
Final simplification71.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a z)))))
(if (<= a -1.4e-55)
t_1
(if (<= a 3.9e-142)
(- y (* z (/ y t)))
(if (or (<= a 5e+51) (not (<= a 7.1e+80))) t_1 (/ (- z a) (/ t x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / z));
double tmp;
if (a <= -1.4e-55) {
tmp = t_1;
} else if (a <= 3.9e-142) {
tmp = y - (z * (y / t));
} else if ((a <= 5e+51) || !(a <= 7.1e+80)) {
tmp = t_1;
} else {
tmp = (z - 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 = x + (y / (a / z))
if (a <= (-1.4d-55)) then
tmp = t_1
else if (a <= 3.9d-142) then
tmp = y - (z * (y / t))
else if ((a <= 5d+51) .or. (.not. (a <= 7.1d+80))) then
tmp = t_1
else
tmp = (z - 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 = x + (y / (a / z));
double tmp;
if (a <= -1.4e-55) {
tmp = t_1;
} else if (a <= 3.9e-142) {
tmp = y - (z * (y / t));
} else if ((a <= 5e+51) || !(a <= 7.1e+80)) {
tmp = t_1;
} else {
tmp = (z - a) / (t / x);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / z)) tmp = 0 if a <= -1.4e-55: tmp = t_1 elif a <= 3.9e-142: tmp = y - (z * (y / t)) elif (a <= 5e+51) or not (a <= 7.1e+80): tmp = t_1 else: tmp = (z - a) / (t / x) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / z))) tmp = 0.0 if (a <= -1.4e-55) tmp = t_1; elseif (a <= 3.9e-142) tmp = Float64(y - Float64(z * Float64(y / t))); elseif ((a <= 5e+51) || !(a <= 7.1e+80)) tmp = t_1; else tmp = Float64(Float64(z - a) / Float64(t / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / z)); tmp = 0.0; if (a <= -1.4e-55) tmp = t_1; elseif (a <= 3.9e-142) tmp = y - (z * (y / t)); elseif ((a <= 5e+51) || ~((a <= 7.1e+80))) tmp = t_1; else tmp = (z - a) / (t / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e-55], t$95$1, If[LessEqual[a, 3.9e-142], N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5e+51], N[Not[LessEqual[a, 7.1e+80]], $MachinePrecision]], t$95$1, N[(N[(z - a), $MachinePrecision] / N[(t / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-142}:\\
\;\;\;\;y - z \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+51} \lor \neg \left(a \leq 7.1 \cdot 10^{+80}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z - a}{\frac{t}{x}}\\
\end{array}
\end{array}
if a < -1.39999999999999992e-55 or 3.9000000000000003e-142 < a < 5e51 or 7.09999999999999988e80 < a Initial program 74.6%
associate-/l*91.6%
Simplified91.6%
Taylor expanded in a around inf 76.2%
Taylor expanded in x around 0 62.7%
Taylor expanded in t around 0 57.2%
associate-/l*61.4%
Simplified61.4%
if -1.39999999999999992e-55 < a < 3.9000000000000003e-142Initial program 65.6%
associate-/l*82.6%
Simplified82.6%
associate-/l*65.6%
div-inv65.5%
*-commutative65.5%
associate-*r*81.1%
div-inv81.2%
clear-num81.1%
div-inv81.2%
associate-/r/82.7%
div-inv82.5%
associate-*l*81.1%
Applied egg-rr81.1%
Taylor expanded in x around 0 54.6%
*-commutative54.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in a around 0 64.1%
mul-1-neg64.1%
distribute-neg-frac64.1%
Simplified64.1%
Taylor expanded in z around 0 63.1%
+-commutative63.1%
mul-1-neg63.1%
*-commutative63.1%
associate-*r/66.5%
unsub-neg66.5%
Simplified66.5%
if 5e51 < a < 7.09999999999999988e80Initial program 16.2%
associate-/l*36.7%
Simplified36.7%
Taylor expanded in x around -inf 51.0%
mul-1-neg51.0%
distribute-rgt-neg-in51.0%
Simplified51.0%
Taylor expanded in t around -inf 52.1%
associate-/l*62.2%
Simplified62.2%
Final simplification63.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= a -4.6e-57)
t_1
(if (<= a 3.1e-142)
y
(if (<= a 1.1e-103)
(* x (/ z t))
(if (<= a 6.5e-36) (* x (- 1.0 (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (a <= -4.6e-57) {
tmp = t_1;
} else if (a <= 3.1e-142) {
tmp = y;
} else if (a <= 1.1e-103) {
tmp = x * (z / t);
} else if (a <= 6.5e-36) {
tmp = x * (1.0 - (z / a));
} 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 + (z * (y / a))
if (a <= (-4.6d-57)) then
tmp = t_1
else if (a <= 3.1d-142) then
tmp = y
else if (a <= 1.1d-103) then
tmp = x * (z / t)
else if (a <= 6.5d-36) then
tmp = x * (1.0d0 - (z / a))
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 + (z * (y / a));
double tmp;
if (a <= -4.6e-57) {
tmp = t_1;
} else if (a <= 3.1e-142) {
tmp = y;
} else if (a <= 1.1e-103) {
tmp = x * (z / t);
} else if (a <= 6.5e-36) {
tmp = x * (1.0 - (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if a <= -4.6e-57: tmp = t_1 elif a <= 3.1e-142: tmp = y elif a <= 1.1e-103: tmp = x * (z / t) elif a <= 6.5e-36: tmp = x * (1.0 - (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (a <= -4.6e-57) tmp = t_1; elseif (a <= 3.1e-142) tmp = y; elseif (a <= 1.1e-103) tmp = Float64(x * Float64(z / t)); elseif (a <= 6.5e-36) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (a <= -4.6e-57) tmp = t_1; elseif (a <= 3.1e-142) tmp = y; elseif (a <= 1.1e-103) tmp = x * (z / t); elseif (a <= 6.5e-36) tmp = x * (1.0 - (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.6e-57], t$95$1, If[LessEqual[a, 3.1e-142], y, If[LessEqual[a, 1.1e-103], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-36], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -4.6 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-142}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-36}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -4.6e-57 or 6.50000000000000012e-36 < a Initial program 70.7%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in t around 0 66.4%
Taylor expanded in y around inf 56.5%
associate-/l*60.4%
associate-/r/59.3%
Simplified59.3%
if -4.6e-57 < a < 3.1e-142Initial program 65.6%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in t around inf 49.0%
if 3.1e-142 < a < 1.1e-103Initial program 67.9%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in x around -inf 56.4%
mul-1-neg56.4%
distribute-rgt-neg-in56.4%
Simplified56.4%
Taylor expanded in a around 0 57.0%
associate-/l*46.2%
associate-/r/67.6%
Applied egg-rr67.6%
if 1.1e-103 < a < 6.50000000000000012e-36Initial program 95.6%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in t around 0 71.3%
Taylor expanded in x around inf 56.8%
*-commutative56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.2e+34) (not (<= t 3e-70))) (* y (/ (- z t) (- a t))) (+ x (/ (- y x) (/ a (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.2e+34) || !(t <= 3e-70)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((y - x) / (a / (z - 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 ((t <= (-2.2d+34)) .or. (.not. (t <= 3d-70))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + ((y - x) / (a / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.2e+34) || !(t <= 3e-70)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((y - x) / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.2e+34) or not (t <= 3e-70): tmp = y * ((z - t) / (a - t)) else: tmp = x + ((y - x) / (a / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.2e+34) || !(t <= 3e-70)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.2e+34) || ~((t <= 3e-70))) tmp = y * ((z - t) / (a - t)); else tmp = x + ((y - x) / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.2e+34], N[Not[LessEqual[t, 3e-70]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+34} \lor \neg \left(t \leq 3 \cdot 10^{-70}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if t < -2.2000000000000002e34 or 3.0000000000000001e-70 < t Initial program 49.1%
associate-/l*76.7%
Simplified76.7%
Taylor expanded in x around 0 35.5%
associate-*r/60.3%
Simplified60.3%
if -2.2000000000000002e34 < t < 3.0000000000000001e-70Initial program 90.7%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in a around inf 81.7%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.7e-44) (not (<= y 3.7e-118))) (- x (/ (- t z) (/ (- a t) y))) (* x (+ (/ (- t z) (- a t)) 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.7e-44) || !(y <= 3.7e-118)) {
tmp = x - ((t - z) / ((a - t) / y));
} else {
tmp = x * (((t - z) / (a - t)) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3.7d-44)) .or. (.not. (y <= 3.7d-118))) then
tmp = x - ((t - z) / ((a - t) / y))
else
tmp = x * (((t - z) / (a - t)) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.7e-44) || !(y <= 3.7e-118)) {
tmp = x - ((t - z) / ((a - t) / y));
} else {
tmp = x * (((t - z) / (a - t)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.7e-44) or not (y <= 3.7e-118): tmp = x - ((t - z) / ((a - t) / y)) else: tmp = x * (((t - z) / (a - t)) + 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.7e-44) || !(y <= 3.7e-118)) tmp = Float64(x - Float64(Float64(t - z) / Float64(Float64(a - t) / y))); else tmp = Float64(x * Float64(Float64(Float64(t - z) / Float64(a - t)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.7e-44) || ~((y <= 3.7e-118))) tmp = x - ((t - z) / ((a - t) / y)); else tmp = x * (((t - z) / (a - t)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.7e-44], N[Not[LessEqual[y, 3.7e-118]], $MachinePrecision]], N[(x - N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-44} \lor \neg \left(y \leq 3.7 \cdot 10^{-118}\right):\\
\;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\
\end{array}
\end{array}
if y < -3.7e-44 or 3.70000000000000014e-118 < y Initial program 69.5%
*-commutative69.5%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in y around inf 84.7%
if -3.7e-44 < y < 3.70000000000000014e-118Initial program 70.6%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in x around inf 64.2%
mul-1-neg64.2%
unsub-neg64.2%
Simplified64.2%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.45e-56) x (if (<= a 3.9e-142) y (if (<= a 1.06e+30) (* y (/ z a)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.45e-56) {
tmp = x;
} else if (a <= 3.9e-142) {
tmp = y;
} else if (a <= 1.06e+30) {
tmp = y * (z / 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 <= (-1.45d-56)) then
tmp = x
else if (a <= 3.9d-142) then
tmp = y
else if (a <= 1.06d+30) then
tmp = y * (z / 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 <= -1.45e-56) {
tmp = x;
} else if (a <= 3.9e-142) {
tmp = y;
} else if (a <= 1.06e+30) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.45e-56: tmp = x elif a <= 3.9e-142: tmp = y elif a <= 1.06e+30: tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.45e-56) tmp = x; elseif (a <= 3.9e-142) tmp = y; elseif (a <= 1.06e+30) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.45e-56) tmp = x; elseif (a <= 3.9e-142) tmp = y; elseif (a <= 1.06e+30) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.45e-56], x, If[LessEqual[a, 3.9e-142], y, If[LessEqual[a, 1.06e+30], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-142}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{+30}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.44999999999999996e-56 or 1.06e30 < a Initial program 70.4%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in a around inf 45.8%
if -1.44999999999999996e-56 < a < 3.9000000000000003e-142Initial program 65.6%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in t around inf 49.0%
if 3.9000000000000003e-142 < a < 1.06e30Initial program 79.5%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in t around 0 58.2%
Taylor expanded in y around inf 48.8%
Taylor expanded in x around 0 33.1%
associate-*r/39.5%
Simplified39.5%
Final simplification46.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.2e-57) (not (<= a 3.6e-142))) (+ x (/ y (/ a z))) y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e-57) || !(a <= 3.6e-142)) {
tmp = x + (y / (a / z));
} else {
tmp = 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 ((a <= (-2.2d-57)) .or. (.not. (a <= 3.6d-142))) then
tmp = x + (y / (a / z))
else
tmp = y
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.2e-57) || !(a <= 3.6e-142)) {
tmp = x + (y / (a / z));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.2e-57) or not (a <= 3.6e-142): tmp = x + (y / (a / z)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.2e-57) || !(a <= 3.6e-142)) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.2e-57) || ~((a <= 3.6e-142))) tmp = x + (y / (a / z)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.2e-57], N[Not[LessEqual[a, 3.6e-142]], $MachinePrecision]], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-57} \lor \neg \left(a \leq 3.6 \cdot 10^{-142}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if a < -2.19999999999999999e-57 or 3.6e-142 < a Initial program 71.9%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in a around inf 73.4%
Taylor expanded in x around 0 60.0%
Taylor expanded in t around 0 54.7%
associate-/l*58.7%
Simplified58.7%
if -2.19999999999999999e-57 < a < 3.6e-142Initial program 65.6%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in t around inf 49.0%
Final simplification55.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.6e-57) (not (<= a 3.9e-142))) (+ x (/ y (/ a z))) (- y (* z (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.6e-57) || !(a <= 3.9e-142)) {
tmp = x + (y / (a / z));
} else {
tmp = y - (z * (y / 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 ((a <= (-1.6d-57)) .or. (.not. (a <= 3.9d-142))) then
tmp = x + (y / (a / z))
else
tmp = y - (z * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.6e-57) || !(a <= 3.9e-142)) {
tmp = x + (y / (a / z));
} else {
tmp = y - (z * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.6e-57) or not (a <= 3.9e-142): tmp = x + (y / (a / z)) else: tmp = y - (z * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.6e-57) || !(a <= 3.9e-142)) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(y - Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.6e-57) || ~((a <= 3.9e-142))) tmp = x + (y / (a / z)); else tmp = y - (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.6e-57], N[Not[LessEqual[a, 3.9e-142]], $MachinePrecision]], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-57} \lor \neg \left(a \leq 3.9 \cdot 10^{-142}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y - z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -1.6e-57 or 3.9000000000000003e-142 < a Initial program 71.9%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in a around inf 73.4%
Taylor expanded in x around 0 60.0%
Taylor expanded in t around 0 54.7%
associate-/l*58.7%
Simplified58.7%
if -1.6e-57 < a < 3.9000000000000003e-142Initial program 65.6%
associate-/l*82.6%
Simplified82.6%
associate-/l*65.6%
div-inv65.5%
*-commutative65.5%
associate-*r*81.1%
div-inv81.2%
clear-num81.1%
div-inv81.2%
associate-/r/82.7%
div-inv82.5%
associate-*l*81.1%
Applied egg-rr81.1%
Taylor expanded in x around 0 54.6%
*-commutative54.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in a around 0 64.1%
mul-1-neg64.1%
distribute-neg-frac64.1%
Simplified64.1%
Taylor expanded in z around 0 63.1%
+-commutative63.1%
mul-1-neg63.1%
*-commutative63.1%
associate-*r/66.5%
unsub-neg66.5%
Simplified66.5%
Final simplification61.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e-55) x (if (<= a 1300000000.0) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e-55) {
tmp = x;
} else if (a <= 1300000000.0) {
tmp = y;
} 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 <= (-1.4d-55)) then
tmp = x
else if (a <= 1300000000.0d0) then
tmp = y
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 <= -1.4e-55) {
tmp = x;
} else if (a <= 1300000000.0) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e-55: tmp = x elif a <= 1300000000.0: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e-55) tmp = x; elseif (a <= 1300000000.0) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e-55) tmp = x; elseif (a <= 1300000000.0) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-55], x, If[LessEqual[a, 1300000000.0], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-55}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1300000000:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.39999999999999992e-55 or 1.3e9 < a Initial program 71.0%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in a around inf 45.6%
if -1.39999999999999992e-55 < a < 1.3e9Initial program 68.5%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in t around inf 41.9%
Final simplification44.0%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 69.9%
associate-/l*87.0%
Simplified87.0%
Taylor expanded in a around inf 29.1%
Final simplification29.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023238
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))