
(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 16 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) (- z t)) (- a t)))))
(if (or (<= t_1 -4e-260) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(+ y (* x (/ (- z a) t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -4e-260) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y + (x * ((z - a) / t));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -4e-260) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-260], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-260} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999985e-260 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 71.5%
+-commutative71.5%
associate-/l*89.8%
fma-define89.9%
Simplified89.9%
if -3.99999999999999985e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around -inf 99.4%
Taylor expanded in y around 0 99.4%
associate-*r/99.4%
mul-1-neg99.4%
associate-*r*99.4%
mul-1-neg99.4%
cancel-sign-sub99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
mul-1-neg99.4%
*-commutative99.4%
distribute-lft-in99.4%
*-lft-identity99.4%
metadata-eval99.4%
cancel-sign-sub-inv99.4%
distribute-neg-frac99.4%
associate-/l*99.5%
distribute-lft-out--99.5%
associate-*r/99.5%
Simplified99.5%
Final simplification90.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (* y (- 1.0 (/ x y))) (/ (- z t) (- a t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -2e+250)
t_1
(if (<= t_2 -4e-260)
t_2
(if (<= t_2 0.0)
(+ y (* x (/ (- z a) t)))
(if (<= t_2 5e+287) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (1.0 - (x / y))) * ((z - t) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e+250) {
tmp = t_1;
} else if (t_2 <= -4e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (x * ((z - a) / t));
} else if (t_2 <= 5e+287) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y * (1.0d0 - (x / y))) * ((z - t) / (a - t)))
t_2 = x + (((y - x) * (z - t)) / (a - t))
if (t_2 <= (-2d+250)) then
tmp = t_1
else if (t_2 <= (-4d-260)) then
tmp = t_2
else if (t_2 <= 0.0d0) then
tmp = y + (x * ((z - a) / t))
else if (t_2 <= 5d+287) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (1.0 - (x / y))) * ((z - t) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e+250) {
tmp = t_1;
} else if (t_2 <= -4e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (x * ((z - a) / t));
} else if (t_2 <= 5e+287) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * (1.0 - (x / y))) * ((z - t) / (a - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -2e+250: tmp = t_1 elif t_2 <= -4e-260: tmp = t_2 elif t_2 <= 0.0: tmp = y + (x * ((z - a) / t)) elif t_2 <= 5e+287: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * Float64(1.0 - Float64(x / y))) * Float64(Float64(z - t) / Float64(a - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e+250) tmp = t_1; elseif (t_2 <= -4e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); elseif (t_2 <= 5e+287) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * (1.0 - (x / y))) * ((z - t) / (a - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -2e+250) tmp = t_1; elseif (t_2 <= -4e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + (x * ((z - a) / t)); elseif (t_2 <= 5e+287) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+250], t$95$1, If[LessEqual[t$95$2, -4e-260], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+287], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y \cdot \left(1 - \frac{x}{y}\right)\right) \cdot \frac{z - t}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-260}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.9999999999999998e250 or 5e287 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 42.2%
+-commutative42.2%
associate-/l*87.5%
fma-define87.5%
Simplified87.5%
Taylor expanded in y around inf 81.5%
mul-1-neg81.5%
unsub-neg81.5%
Simplified81.5%
fma-undefine81.5%
Applied egg-rr81.5%
if -1.9999999999999998e250 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999985e-260 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5e287Initial program 96.1%
if -3.99999999999999985e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around -inf 99.4%
Taylor expanded in y around 0 99.4%
associate-*r/99.4%
mul-1-neg99.4%
associate-*r*99.4%
mul-1-neg99.4%
cancel-sign-sub99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
mul-1-neg99.4%
*-commutative99.4%
distribute-lft-in99.4%
*-lft-identity99.4%
metadata-eval99.4%
cancel-sign-sub-inv99.4%
distribute-neg-frac99.4%
associate-/l*99.5%
distribute-lft-out--99.5%
associate-*r/99.5%
Simplified99.5%
Final simplification90.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t)))))
(t_2 (* (- y x) (- z t)))
(t_3 (+ x (/ t_2 (- a t)))))
(if (<= t_3 (- INFINITY))
t_1
(if (<= t_3 -4e-260)
(+ x (/ 1.0 (/ (- a t) t_2)))
(if (<= t_3 0.0)
(+ y (* x (/ (- z a) t)))
(if (<= t_3 1e+256) t_3 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double t_2 = (y - x) * (z - t);
double t_3 = x + (t_2 / (a - t));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_3 <= -4e-260) {
tmp = x + (1.0 / ((a - t) / t_2));
} else if (t_3 <= 0.0) {
tmp = y + (x * ((z - a) / t));
} else if (t_3 <= 1e+256) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double t_2 = (y - x) * (z - t);
double t_3 = x + (t_2 / (a - t));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_3 <= -4e-260) {
tmp = x + (1.0 / ((a - t) / t_2));
} else if (t_3 <= 0.0) {
tmp = y + (x * ((z - a) / t));
} else if (t_3 <= 1e+256) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) t_2 = (y - x) * (z - t) t_3 = x + (t_2 / (a - t)) tmp = 0 if t_3 <= -math.inf: tmp = t_1 elif t_3 <= -4e-260: tmp = x + (1.0 / ((a - t) / t_2)) elif t_3 <= 0.0: tmp = y + (x * ((z - a) / t)) elif t_3 <= 1e+256: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) t_2 = Float64(Float64(y - x) * Float64(z - t)) t_3 = Float64(x + Float64(t_2 / Float64(a - t))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_1; elseif (t_3 <= -4e-260) tmp = Float64(x + Float64(1.0 / Float64(Float64(a - t) / t_2))); elseif (t_3 <= 0.0) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); elseif (t_3 <= 1e+256) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); t_2 = (y - x) * (z - t); t_3 = x + (t_2 / (a - t)); tmp = 0.0; if (t_3 <= -Inf) tmp = t_1; elseif (t_3 <= -4e-260) tmp = x + (1.0 / ((a - t) / t_2)); elseif (t_3 <= 0.0) tmp = y + (x * ((z - a) / t)); elseif (t_3 <= 1e+256) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(t$95$2 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$1, If[LessEqual[t$95$3, -4e-260], N[(x + N[(1.0 / N[(N[(a - t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+256], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
t_2 := \left(y - x\right) \cdot \left(z - t\right)\\
t_3 := x + \frac{t\_2}{a - t}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-260}:\\
\;\;\;\;x + \frac{1}{\frac{a - t}{t\_2}}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t\_3 \leq 10^{+256}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 1e256 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 39.5%
Taylor expanded in y around inf 38.1%
associate-/l*68.4%
Simplified68.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999985e-260Initial program 94.7%
clear-num94.7%
inv-pow94.7%
Applied egg-rr94.7%
unpow-194.7%
*-commutative94.7%
Simplified94.7%
if -3.99999999999999985e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around -inf 99.4%
Taylor expanded in y around 0 99.4%
associate-*r/99.4%
mul-1-neg99.4%
associate-*r*99.4%
mul-1-neg99.4%
cancel-sign-sub99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
mul-1-neg99.4%
*-commutative99.4%
distribute-lft-in99.4%
*-lft-identity99.4%
metadata-eval99.4%
cancel-sign-sub-inv99.4%
distribute-neg-frac99.4%
associate-/l*99.5%
distribute-lft-out--99.5%
associate-*r/99.5%
Simplified99.5%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1e256Initial program 98.2%
Final simplification85.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-260)
t_2
(if (<= t_2 0.0)
(+ y (* x (/ (- z a) t)))
(if (<= t_2 1e+256) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (x * ((z - a) / t));
} else if (t_2 <= 1e+256) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -4e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (x * ((z - a) / t));
} else if (t_2 <= 1e+256) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -4e-260: tmp = t_2 elif t_2 <= 0.0: tmp = y + (x * ((z - a) / t)) elif t_2 <= 1e+256: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); elseif (t_2 <= 1e+256) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -4e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + (x * ((z - a) / t)); elseif (t_2 <= 1e+256) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-260], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+256], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-260}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t\_2 \leq 10^{+256}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 1e256 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 39.5%
Taylor expanded in y around inf 38.1%
associate-/l*68.4%
Simplified68.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999985e-260 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1e256Initial program 96.2%
if -3.99999999999999985e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around -inf 99.4%
Taylor expanded in y around 0 99.4%
associate-*r/99.4%
mul-1-neg99.4%
associate-*r*99.4%
mul-1-neg99.4%
cancel-sign-sub99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
mul-1-neg99.4%
*-commutative99.4%
distribute-lft-in99.4%
*-lft-identity99.4%
metadata-eval99.4%
cancel-sign-sub-inv99.4%
distribute-neg-frac99.4%
associate-/l*99.5%
distribute-lft-out--99.5%
associate-*r/99.5%
Simplified99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (<= y -8.8e-61)
t_1
(if (<= y 1.38e-124)
(+ x (* x (/ (- z t) (- t a))))
(if (<= y 8.4e-75)
(+ y (* (- z a) (/ (- x y) t)))
(if (<= y 2.1e-49) (+ x (* z (/ (- y x) a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y <= -8.8e-61) {
tmp = t_1;
} else if (y <= 1.38e-124) {
tmp = x + (x * ((z - t) / (t - a)));
} else if (y <= 8.4e-75) {
tmp = y + ((z - a) * ((x - y) / t));
} else if (y <= 2.1e-49) {
tmp = x + (z * ((y - x) / 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 + (y * ((z - t) / (a - t)))
if (y <= (-8.8d-61)) then
tmp = t_1
else if (y <= 1.38d-124) then
tmp = x + (x * ((z - t) / (t - a)))
else if (y <= 8.4d-75) then
tmp = y + ((z - a) * ((x - y) / t))
else if (y <= 2.1d-49) then
tmp = x + (z * ((y - x) / 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 + (y * ((z - t) / (a - t)));
double tmp;
if (y <= -8.8e-61) {
tmp = t_1;
} else if (y <= 1.38e-124) {
tmp = x + (x * ((z - t) / (t - a)));
} else if (y <= 8.4e-75) {
tmp = y + ((z - a) * ((x - y) / t));
} else if (y <= 2.1e-49) {
tmp = x + (z * ((y - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y <= -8.8e-61: tmp = t_1 elif y <= 1.38e-124: tmp = x + (x * ((z - t) / (t - a))) elif y <= 8.4e-75: tmp = y + ((z - a) * ((x - y) / t)) elif y <= 2.1e-49: tmp = x + (z * ((y - x) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y <= -8.8e-61) tmp = t_1; elseif (y <= 1.38e-124) tmp = Float64(x + Float64(x * Float64(Float64(z - t) / Float64(t - a)))); elseif (y <= 8.4e-75) tmp = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))); elseif (y <= 2.1e-49) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y <= -8.8e-61) tmp = t_1; elseif (y <= 1.38e-124) tmp = x + (x * ((z - t) / (t - a))); elseif (y <= 8.4e-75) tmp = y + ((z - a) * ((x - y) / t)); elseif (y <= 2.1e-49) tmp = x + (z * ((y - x) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e-61], t$95$1, If[LessEqual[y, 1.38e-124], N[(x + N[(x * N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.4e-75], N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-49], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.38 \cdot 10^{-124}:\\
\;\;\;\;x + x \cdot \frac{z - t}{t - a}\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{-75}:\\
\;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-49}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.80000000000000035e-61 or 2.0999999999999999e-49 < y Initial program 65.2%
Taylor expanded in y around inf 66.3%
associate-/l*85.9%
Simplified85.9%
if -8.80000000000000035e-61 < y < 1.37999999999999995e-124Initial program 70.8%
Taylor expanded in y around 0 61.0%
mul-1-neg61.0%
associate-/l*70.2%
distribute-rgt-neg-in70.2%
mul-1-neg70.2%
associate-*r/70.2%
neg-mul-170.2%
neg-sub070.2%
sub-neg70.2%
+-commutative70.2%
associate--r+70.2%
neg-sub070.2%
remove-double-neg70.2%
Simplified70.2%
if 1.37999999999999995e-124 < y < 8.4000000000000004e-75Initial program 63.8%
+-commutative63.8%
associate-/l*51.6%
fma-define51.6%
Simplified51.6%
Taylor expanded in t around inf 75.5%
associate--l+75.5%
distribute-lft-out--75.5%
div-sub75.5%
mul-1-neg75.5%
unsub-neg75.5%
div-sub75.5%
associate-/l*87.6%
associate-/l*87.6%
distribute-rgt-out--87.6%
Simplified87.6%
if 8.4000000000000004e-75 < y < 2.0999999999999999e-49Initial program 100.0%
Taylor expanded in t around 0 100.0%
associate-/l*100.0%
Simplified100.0%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (<= y -5e-58)
t_1
(if (<= y 2.5e-217)
(* x (+ (+ 1.0 (/ t (- a t))) (/ z (- t a))))
(if (<= y 1.12e-48) (+ x (/ (* (- y x) (- z t)) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y <= -5e-58) {
tmp = t_1;
} else if (y <= 2.5e-217) {
tmp = x * ((1.0 + (t / (a - t))) + (z / (t - a)));
} else if (y <= 1.12e-48) {
tmp = x + (((y - x) * (z - t)) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / (a - t)))
if (y <= (-5d-58)) then
tmp = t_1
else if (y <= 2.5d-217) then
tmp = x * ((1.0d0 + (t / (a - t))) + (z / (t - a)))
else if (y <= 1.12d-48) then
tmp = x + (((y - x) * (z - t)) / (a - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y <= -5e-58) {
tmp = t_1;
} else if (y <= 2.5e-217) {
tmp = x * ((1.0 + (t / (a - t))) + (z / (t - a)));
} else if (y <= 1.12e-48) {
tmp = x + (((y - x) * (z - t)) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y <= -5e-58: tmp = t_1 elif y <= 2.5e-217: tmp = x * ((1.0 + (t / (a - t))) + (z / (t - a))) elif y <= 1.12e-48: tmp = x + (((y - x) * (z - t)) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y <= -5e-58) tmp = t_1; elseif (y <= 2.5e-217) tmp = Float64(x * Float64(Float64(1.0 + Float64(t / Float64(a - t))) + Float64(z / Float64(t - a)))); elseif (y <= 1.12e-48) tmp = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y <= -5e-58) tmp = t_1; elseif (y <= 2.5e-217) tmp = x * ((1.0 + (t / (a - t))) + (z / (t - a))); elseif (y <= 1.12e-48) tmp = x + (((y - x) * (z - t)) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e-58], t$95$1, If[LessEqual[y, 2.5e-217], N[(x * N[(N[(1.0 + N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e-48], N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -5 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-217}:\\
\;\;\;\;x \cdot \left(\left(1 + \frac{t}{a - t}\right) + \frac{z}{t - a}\right)\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-48}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.99999999999999977e-58 or 1.11999999999999999e-48 < y Initial program 65.2%
Taylor expanded in y around inf 66.3%
associate-/l*85.9%
Simplified85.9%
if -4.99999999999999977e-58 < y < 2.5000000000000001e-217Initial program 68.5%
+-commutative68.5%
associate-/l*78.0%
fma-define78.1%
Simplified78.1%
Taylor expanded in x around -inf 82.3%
associate-*r*82.3%
neg-mul-182.3%
+-commutative82.3%
Simplified82.3%
if 2.5000000000000001e-217 < y < 1.11999999999999999e-48Initial program 76.8%
Final simplification83.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a t)))))
(if (<= z -2.5e+72)
t_1
(if (<= z -1.75e-227)
x
(if (<= z -4.3e-303) y (if (<= z 2.3e+47) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (a - t));
double tmp;
if (z <= -2.5e+72) {
tmp = t_1;
} else if (z <= -1.75e-227) {
tmp = x;
} else if (z <= -4.3e-303) {
tmp = y;
} else if (z <= 2.3e+47) {
tmp = 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 = z * (y / (a - t))
if (z <= (-2.5d+72)) then
tmp = t_1
else if (z <= (-1.75d-227)) then
tmp = x
else if (z <= (-4.3d-303)) then
tmp = y
else if (z <= 2.3d+47) then
tmp = 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 = z * (y / (a - t));
double tmp;
if (z <= -2.5e+72) {
tmp = t_1;
} else if (z <= -1.75e-227) {
tmp = x;
} else if (z <= -4.3e-303) {
tmp = y;
} else if (z <= 2.3e+47) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (a - t)) tmp = 0 if z <= -2.5e+72: tmp = t_1 elif z <= -1.75e-227: tmp = x elif z <= -4.3e-303: tmp = y elif z <= 2.3e+47: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(a - t))) tmp = 0.0 if (z <= -2.5e+72) tmp = t_1; elseif (z <= -1.75e-227) tmp = x; elseif (z <= -4.3e-303) tmp = y; elseif (z <= 2.3e+47) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (a - t)); tmp = 0.0; if (z <= -2.5e+72) tmp = t_1; elseif (z <= -1.75e-227) tmp = x; elseif (z <= -4.3e-303) tmp = y; elseif (z <= 2.3e+47) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+72], t$95$1, If[LessEqual[z, -1.75e-227], x, If[LessEqual[z, -4.3e-303], y, If[LessEqual[z, 2.3e+47], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a - t}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-227}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-303}:\\
\;\;\;\;y\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.49999999999999996e72 or 2.2999999999999999e47 < z Initial program 66.8%
+-commutative66.8%
associate-/l*86.7%
fma-define86.7%
Simplified86.7%
Taylor expanded in y around inf 81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
Taylor expanded in z around inf 55.1%
Taylor expanded in y around inf 36.5%
*-commutative36.5%
associate-*r/43.1%
Simplified43.1%
if -2.49999999999999996e72 < z < -1.75000000000000005e-227 or -4.29999999999999981e-303 < z < 2.2999999999999999e47Initial program 72.2%
+-commutative72.2%
associate-/l*84.9%
fma-define84.9%
Simplified84.9%
Taylor expanded in a around inf 45.9%
if -1.75000000000000005e-227 < z < -4.29999999999999981e-303Initial program 38.4%
+-commutative38.4%
associate-/l*71.8%
fma-define71.8%
Simplified71.8%
Taylor expanded in t around inf 49.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ z t))))
(if (<= a -1.02e-29)
x
(if (<= a 1.2e-170)
t_1
(if (<= a 1.65e+22) y (if (<= a 1.45e+32) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (z / t);
double tmp;
if (a <= -1.02e-29) {
tmp = x;
} else if (a <= 1.2e-170) {
tmp = t_1;
} else if (a <= 1.65e+22) {
tmp = y;
} else if (a <= 1.45e+32) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (z / t)
if (a <= (-1.02d-29)) then
tmp = x
else if (a <= 1.2d-170) then
tmp = t_1
else if (a <= 1.65d+22) then
tmp = y
else if (a <= 1.45d+32) then
tmp = t_1
else
tmp = 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 * (z / t);
double tmp;
if (a <= -1.02e-29) {
tmp = x;
} else if (a <= 1.2e-170) {
tmp = t_1;
} else if (a <= 1.65e+22) {
tmp = y;
} else if (a <= 1.45e+32) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (z / t) tmp = 0 if a <= -1.02e-29: tmp = x elif a <= 1.2e-170: tmp = t_1 elif a <= 1.65e+22: tmp = y elif a <= 1.45e+32: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(z / t)) tmp = 0.0 if (a <= -1.02e-29) tmp = x; elseif (a <= 1.2e-170) tmp = t_1; elseif (a <= 1.65e+22) tmp = y; elseif (a <= 1.45e+32) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (z / t); tmp = 0.0; if (a <= -1.02e-29) tmp = x; elseif (a <= 1.2e-170) tmp = t_1; elseif (a <= 1.65e+22) tmp = y; elseif (a <= 1.45e+32) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.02e-29], x, If[LessEqual[a, 1.2e-170], t$95$1, If[LessEqual[a, 1.65e+22], y, If[LessEqual[a, 1.45e+32], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -1.02 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+22}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.01999999999999994e-29 or 1.45000000000000001e32 < a Initial program 67.0%
+-commutative67.0%
associate-/l*93.6%
fma-define93.6%
Simplified93.6%
Taylor expanded in a around inf 46.6%
if -1.01999999999999994e-29 < a < 1.2e-170 or 1.6499999999999999e22 < a < 1.45000000000000001e32Initial program 68.0%
+-commutative68.0%
associate-/l*75.0%
fma-define75.1%
Simplified75.1%
Taylor expanded in y around inf 71.5%
mul-1-neg71.5%
unsub-neg71.5%
Simplified71.5%
Taylor expanded in z around inf 48.6%
Taylor expanded in a around 0 38.6%
mul-1-neg38.6%
associate-/l*36.4%
distribute-rgt-neg-in36.4%
Simplified36.4%
Taylor expanded in y around 0 35.3%
associate-/l*39.7%
Simplified39.7%
if 1.2e-170 < a < 1.6499999999999999e22Initial program 69.0%
+-commutative69.0%
associate-/l*73.8%
fma-define73.8%
Simplified73.8%
Taylor expanded in t around inf 29.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.65e-60) (not (<= y 1.12e-95))) (+ x (* y (/ (- z t) (- a t)))) (+ x (* x (/ (- z t) (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.65e-60) || !(y <= 1.12e-95)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = x + (x * ((z - t) / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.65d-60)) .or. (.not. (y <= 1.12d-95))) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = x + (x * ((z - t) / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.65e-60) || !(y <= 1.12e-95)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = x + (x * ((z - t) / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.65e-60) or not (y <= 1.12e-95): tmp = x + (y * ((z - t) / (a - t))) else: tmp = x + (x * ((z - t) / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.65e-60) || !(y <= 1.12e-95)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(x + Float64(x * Float64(Float64(z - t) / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.65e-60) || ~((y <= 1.12e-95))) tmp = x + (y * ((z - t) / (a - t))); else tmp = x + (x * ((z - t) / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.65e-60], N[Not[LessEqual[y, 1.12e-95]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{-60} \lor \neg \left(y \leq 1.12 \cdot 10^{-95}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \frac{z - t}{t - a}\\
\end{array}
\end{array}
if y < -1.6499999999999999e-60 or 1.12000000000000006e-95 < y Initial program 65.7%
Taylor expanded in y around inf 66.2%
associate-/l*84.3%
Simplified84.3%
if -1.6499999999999999e-60 < y < 1.12000000000000006e-95Initial program 70.8%
Taylor expanded in y around 0 60.5%
mul-1-neg60.5%
associate-/l*69.2%
distribute-rgt-neg-in69.2%
mul-1-neg69.2%
associate-*r/69.2%
neg-mul-169.2%
neg-sub069.2%
sub-neg69.2%
+-commutative69.2%
associate--r+69.2%
neg-sub069.2%
remove-double-neg69.2%
Simplified69.2%
Final simplification78.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2e-23) (not (<= t 1.7e+86))) (+ y (* x (/ (- z a) t))) (+ x (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e-23) || !(t <= 1.7e+86)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2d-23)) .or. (.not. (t <= 1.7d+86))) then
tmp = y + (x * ((z - a) / t))
else
tmp = x + (z * ((y - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e-23) || !(t <= 1.7e+86)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2e-23) or not (t <= 1.7e+86): tmp = y + (x * ((z - a) / t)) else: tmp = x + (z * ((y - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2e-23) || !(t <= 1.7e+86)) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2e-23) || ~((t <= 1.7e+86))) tmp = y + (x * ((z - a) / t)); else tmp = x + (z * ((y - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2e-23], N[Not[LessEqual[t, 1.7e+86]], $MachinePrecision]], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-23} \lor \neg \left(t \leq 1.7 \cdot 10^{+86}\right):\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if t < -1.99999999999999992e-23 or 1.6999999999999999e86 < t Initial program 39.4%
+-commutative39.4%
associate-/l*72.5%
fma-define72.5%
Simplified72.5%
Taylor expanded in t around -inf 58.4%
Taylor expanded in y around 0 58.3%
associate-*r/58.3%
mul-1-neg58.3%
associate-*r*58.3%
mul-1-neg58.3%
cancel-sign-sub58.3%
mul-1-neg58.3%
distribute-rgt-neg-in58.3%
mul-1-neg58.3%
*-commutative58.3%
distribute-lft-in58.3%
*-lft-identity58.3%
metadata-eval58.3%
cancel-sign-sub-inv58.3%
distribute-neg-frac58.3%
associate-/l*65.2%
distribute-lft-out--65.2%
associate-*r/65.2%
Simplified65.2%
if -1.99999999999999992e-23 < t < 1.6999999999999999e86Initial program 88.1%
Taylor expanded in t around 0 68.6%
associate-/l*75.5%
Simplified75.5%
Final simplification71.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.6e+64) (not (<= t 1.96e-44))) (* y (/ (- z t) (- a t))) (+ x (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.6e+64) || !(t <= 1.96e-44)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-5.6d+64)) .or. (.not. (t <= 1.96d-44))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (z * ((y - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.6e+64) || !(t <= 1.96e-44)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.6e+64) or not (t <= 1.96e-44): tmp = y * ((z - t) / (a - t)) else: tmp = x + (z * ((y - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.6e+64) || !(t <= 1.96e-44)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.6e+64) || ~((t <= 1.96e-44))) tmp = y * ((z - t) / (a - t)); else tmp = x + (z * ((y - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.6e+64], N[Not[LessEqual[t, 1.96e-44]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+64} \lor \neg \left(t \leq 1.96 \cdot 10^{-44}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if t < -5.60000000000000047e64 or 1.9599999999999999e-44 < t Initial program 45.7%
+-commutative45.7%
associate-/l*77.9%
fma-define78.0%
Simplified78.0%
Taylor expanded in y around inf 72.3%
mul-1-neg72.3%
unsub-neg72.3%
Simplified72.3%
Taylor expanded in y around inf 57.2%
div-sub57.2%
Simplified57.2%
if -5.60000000000000047e64 < t < 1.9599999999999999e-44Initial program 86.0%
Taylor expanded in t around 0 67.9%
associate-/l*75.9%
Simplified75.9%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.4e-23) (+ y (* x (/ (- z a) t))) (if (<= t 1.3e-44) (+ x (* z (/ (- y x) a))) (+ y (* z (/ (- x y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.4e-23) {
tmp = y + (x * ((z - a) / t));
} else if (t <= 1.3e-44) {
tmp = x + (z * ((y - x) / a));
} else {
tmp = y + (z * ((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) :: tmp
if (t <= (-1.4d-23)) then
tmp = y + (x * ((z - a) / t))
else if (t <= 1.3d-44) then
tmp = x + (z * ((y - x) / a))
else
tmp = y + (z * ((x - 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 (t <= -1.4e-23) {
tmp = y + (x * ((z - a) / t));
} else if (t <= 1.3e-44) {
tmp = x + (z * ((y - x) / a));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.4e-23: tmp = y + (x * ((z - a) / t)) elif t <= 1.3e-44: tmp = x + (z * ((y - x) / a)) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.4e-23) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); elseif (t <= 1.3e-44) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.4e-23) tmp = y + (x * ((z - a) / t)); elseif (t <= 1.3e-44) tmp = x + (z * ((y - x) / a)); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.4e-23], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-44], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-23}:\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-44}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if t < -1.3999999999999999e-23Initial program 45.8%
+-commutative45.8%
associate-/l*71.8%
fma-define71.8%
Simplified71.8%
Taylor expanded in t around -inf 63.8%
Taylor expanded in y around 0 60.3%
associate-*r/60.3%
mul-1-neg60.3%
associate-*r*60.3%
mul-1-neg60.3%
cancel-sign-sub60.3%
mul-1-neg60.3%
distribute-rgt-neg-in60.3%
mul-1-neg60.3%
*-commutative60.3%
distribute-lft-in60.3%
*-lft-identity60.3%
metadata-eval60.3%
cancel-sign-sub-inv60.3%
distribute-neg-frac60.3%
associate-/l*61.9%
distribute-lft-out--61.9%
associate-*r/61.9%
Simplified61.9%
if -1.3999999999999999e-23 < t < 1.2999999999999999e-44Initial program 90.4%
Taylor expanded in t around 0 74.0%
associate-/l*81.5%
Simplified81.5%
if 1.2999999999999999e-44 < t Initial program 47.1%
+-commutative47.1%
associate-/l*80.0%
fma-define80.1%
Simplified80.1%
Taylor expanded in t around -inf 52.0%
Taylor expanded in z around inf 56.1%
mul-1-neg56.1%
associate-/l*65.4%
distribute-rgt-neg-in65.4%
sub-neg65.4%
mul-1-neg65.4%
+-commutative65.4%
remove-double-neg65.4%
neg-mul-165.4%
sub-neg65.4%
distribute-lft-out--65.4%
mul-1-neg65.4%
distribute-neg-frac65.4%
distribute-neg-frac265.4%
distribute-frac-neg265.4%
remove-double-neg65.4%
Simplified65.4%
(FPCore (x y z t a) :precision binary64 (if (<= x -19000000000000.0) x (if (<= x 1.55e+25) (* y (/ (- z t) (- a t))) (/ (* x z) (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -19000000000000.0) {
tmp = x;
} else if (x <= 1.55e+25) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = (x * z) / (t - 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 <= (-19000000000000.0d0)) then
tmp = x
else if (x <= 1.55d+25) then
tmp = y * ((z - t) / (a - t))
else
tmp = (x * z) / (t - 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 <= -19000000000000.0) {
tmp = x;
} else if (x <= 1.55e+25) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = (x * z) / (t - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -19000000000000.0: tmp = x elif x <= 1.55e+25: tmp = y * ((z - t) / (a - t)) else: tmp = (x * z) / (t - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -19000000000000.0) tmp = x; elseif (x <= 1.55e+25) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(Float64(x * z) / Float64(t - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -19000000000000.0) tmp = x; elseif (x <= 1.55e+25) tmp = y * ((z - t) / (a - t)); else tmp = (x * z) / (t - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -19000000000000.0], x, If[LessEqual[x, 1.55e+25], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -19000000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+25}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot z}{t - a}\\
\end{array}
\end{array}
if x < -1.9e13Initial program 59.9%
+-commutative59.9%
associate-/l*84.2%
fma-define84.2%
Simplified84.2%
Taylor expanded in a around inf 48.3%
if -1.9e13 < x < 1.5499999999999999e25Initial program 75.1%
+-commutative75.1%
associate-/l*87.4%
fma-define87.4%
Simplified87.4%
Taylor expanded in y around inf 87.4%
mul-1-neg87.4%
unsub-neg87.4%
Simplified87.4%
Taylor expanded in y around inf 67.4%
div-sub67.4%
Simplified67.4%
if 1.5499999999999999e25 < x Initial program 57.9%
+-commutative57.9%
associate-/l*79.4%
fma-define79.4%
Simplified79.4%
Taylor expanded in y around inf 60.9%
mul-1-neg60.9%
unsub-neg60.9%
Simplified60.9%
Taylor expanded in z around inf 35.9%
Taylor expanded in y around 0 45.5%
associate-*r/45.5%
mul-1-neg45.5%
distribute-rgt-neg-in45.5%
Simplified45.5%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -8.6e-51) x (if (<= x 4.8e-72) (* z (/ y (- a t))) (/ (* x z) (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.6e-51) {
tmp = x;
} else if (x <= 4.8e-72) {
tmp = z * (y / (a - t));
} else {
tmp = (x * z) / (t - 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 <= (-8.6d-51)) then
tmp = x
else if (x <= 4.8d-72) then
tmp = z * (y / (a - t))
else
tmp = (x * z) / (t - 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 <= -8.6e-51) {
tmp = x;
} else if (x <= 4.8e-72) {
tmp = z * (y / (a - t));
} else {
tmp = (x * z) / (t - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8.6e-51: tmp = x elif x <= 4.8e-72: tmp = z * (y / (a - t)) else: tmp = (x * z) / (t - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8.6e-51) tmp = x; elseif (x <= 4.8e-72) tmp = Float64(z * Float64(y / Float64(a - t))); else tmp = Float64(Float64(x * z) / Float64(t - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -8.6e-51) tmp = x; elseif (x <= 4.8e-72) tmp = z * (y / (a - t)); else tmp = (x * z) / (t - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8.6e-51], x, If[LessEqual[x, 4.8e-72], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{-51}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-72}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot z}{t - a}\\
\end{array}
\end{array}
if x < -8.5999999999999995e-51Initial program 60.0%
+-commutative60.0%
associate-/l*82.8%
fma-define82.8%
Simplified82.8%
Taylor expanded in a around inf 44.8%
if -8.5999999999999995e-51 < x < 4.8e-72Initial program 78.0%
+-commutative78.0%
associate-/l*87.6%
fma-define87.6%
Simplified87.6%
Taylor expanded in y around inf 87.5%
mul-1-neg87.5%
unsub-neg87.5%
Simplified87.5%
Taylor expanded in z around inf 42.0%
Taylor expanded in y around inf 37.9%
*-commutative37.9%
associate-*r/42.3%
Simplified42.3%
if 4.8e-72 < x Initial program 59.9%
+-commutative59.9%
associate-/l*82.8%
fma-define82.8%
Simplified82.8%
Taylor expanded in y around inf 68.5%
mul-1-neg68.5%
unsub-neg68.5%
Simplified68.5%
Taylor expanded in z around inf 29.4%
Taylor expanded in y around 0 39.7%
associate-*r/39.7%
mul-1-neg39.7%
distribute-rgt-neg-in39.7%
Simplified39.7%
Final simplification42.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.9e-62) x (if (<= a 3.15e+47) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e-62) {
tmp = x;
} else if (a <= 3.15e+47) {
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.9d-62)) then
tmp = x
else if (a <= 3.15d+47) 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.9e-62) {
tmp = x;
} else if (a <= 3.15e+47) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.9e-62: tmp = x elif a <= 3.15e+47: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.9e-62) tmp = x; elseif (a <= 3.15e+47) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.9e-62) tmp = x; elseif (a <= 3.15e+47) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e-62], x, If[LessEqual[a, 3.15e+47], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-62}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.15 \cdot 10^{+47}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.90000000000000003e-62 or 3.15000000000000002e47 < a Initial program 67.9%
+-commutative67.9%
associate-/l*93.7%
fma-define93.7%
Simplified93.7%
Taylor expanded in a around inf 46.5%
if -1.90000000000000003e-62 < a < 3.15000000000000002e47Initial program 67.2%
+-commutative67.2%
associate-/l*73.8%
fma-define73.8%
Simplified73.8%
Taylor expanded in t around inf 29.2%
(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 67.6%
+-commutative67.6%
associate-/l*84.8%
fma-define84.9%
Simplified84.9%
Taylor expanded in a around inf 28.7%
(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 2024111
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(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))))