
(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 18 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 (if (or (<= t -3.9e+124) (not (<= t 2.7e+208))) (+ y (* (/ (- y x) t) (- a z))) (fma (- y x) (/ (- z t) (- a t)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.9e+124) || !(t <= 2.7e+208)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = fma((y - x), ((z - t) / (a - t)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.9e+124) || !(t <= 2.7e+208)) tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))); else tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.9e+124], N[Not[LessEqual[t, 2.7e+208]], $MachinePrecision]], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{+124} \lor \neg \left(t \leq 2.7 \cdot 10^{+208}\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\end{array}
\end{array}
if t < -3.9e124 or 2.7e208 < t Initial program 27.6%
Taylor expanded in t around inf 69.8%
associate--l+69.8%
distribute-lft-out--69.8%
div-sub69.8%
mul-1-neg69.8%
unsub-neg69.8%
div-sub69.8%
associate-/l*80.8%
associate-/l*90.3%
distribute-rgt-out--90.3%
Simplified90.3%
if -3.9e124 < t < 2.7e208Initial program 77.8%
+-commutative77.8%
associate-/l*93.1%
fma-define93.1%
Simplified93.1%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 -2e+300)
(* z (/ (- y x) (- a t)))
(if (<= t_1 -5e-302)
t_1
(if (<= t_1 0.0)
(+ y (/ (* (- y x) (- a z)) t))
(if (<= t_1 1e+273) t_1 (+ y (* (/ (- y x) t) (- a z)))))))))
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 <= -2e+300) {
tmp = z * ((y - x) / (a - t));
} else if (t_1 <= -5e-302) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_1 <= 1e+273) {
tmp = t_1;
} else {
tmp = y + (((y - x) / t) * (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) * (z - t)) / (a - t))
if (t_1 <= (-2d+300)) then
tmp = z * ((y - x) / (a - t))
else if (t_1 <= (-5d-302)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = y + (((y - x) * (a - z)) / t)
else if (t_1 <= 1d+273) then
tmp = t_1
else
tmp = y + (((y - x) / t) * (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -2e+300) {
tmp = z * ((y - x) / (a - t));
} else if (t_1 <= -5e-302) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_1 <= 1e+273) {
tmp = t_1;
} else {
tmp = y + (((y - x) / t) * (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_1 <= -2e+300: tmp = z * ((y - x) / (a - t)) elif t_1 <= -5e-302: tmp = t_1 elif t_1 <= 0.0: tmp = y + (((y - x) * (a - z)) / t) elif t_1 <= 1e+273: tmp = t_1 else: tmp = y + (((y - x) / t) * (a - z)) 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 <= -2e+300) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); elseif (t_1 <= -5e-302) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); elseif (t_1 <= 1e+273) tmp = t_1; else tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -2e+300) tmp = z * ((y - x) / (a - t)); elseif (t_1 <= -5e-302) tmp = t_1; elseif (t_1 <= 0.0) tmp = y + (((y - x) * (a - z)) / t); elseif (t_1 <= 1e+273) tmp = t_1; else tmp = y + (((y - x) / t) * (a - z)); end tmp_2 = 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[LessEqual[t$95$1, -2e+300], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-302], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+273], t$95$1, N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $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 -2 \cdot 10^{+300}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-302}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+273}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.0000000000000001e300Initial program 38.5%
+-commutative38.5%
associate-/l*81.8%
fma-define81.8%
Simplified81.8%
clear-num81.7%
inv-pow81.7%
Applied egg-rr81.7%
unpow-181.7%
Simplified81.7%
Taylor expanded in z around inf 76.3%
div-sub76.3%
Simplified76.3%
if -2.0000000000000001e300 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.00000000000000033e-302 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.99999999999999945e272Initial program 97.7%
if -5.00000000000000033e-302 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 8.6%
+-commutative8.6%
associate-/l*8.6%
fma-define8.6%
Simplified8.6%
clear-num8.6%
inv-pow8.6%
Applied egg-rr8.6%
unpow-18.6%
Simplified8.6%
Taylor expanded in t around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
associate-*r/100.0%
mul-1-neg100.0%
div-sub100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
associate-*r/100.0%
mul-1-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
if 9.99999999999999945e272 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 34.2%
Taylor expanded in t around inf 55.8%
associate--l+55.8%
distribute-lft-out--55.8%
div-sub57.8%
mul-1-neg57.8%
unsub-neg57.8%
div-sub55.8%
associate-/l*62.8%
associate-/l*71.8%
distribute-rgt-out--75.7%
Simplified75.7%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (<= a -0.061)
t_1
(if (<= a -2.7e-23)
(* x (/ (- z a) t))
(if (<= a -3.2e-34)
(+ x (* z (/ (- y x) a)))
(if (<= a 9.4e-141) (+ y (/ (* z (- x y)) 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 (a <= -0.061) {
tmp = t_1;
} else if (a <= -2.7e-23) {
tmp = x * ((z - a) / t);
} else if (a <= -3.2e-34) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 9.4e-141) {
tmp = y + ((z * (x - y)) / 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 (a <= (-0.061d0)) then
tmp = t_1
else if (a <= (-2.7d-23)) then
tmp = x * ((z - a) / t)
else if (a <= (-3.2d-34)) then
tmp = x + (z * ((y - x) / a))
else if (a <= 9.4d-141) then
tmp = y + ((z * (x - y)) / 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 (a <= -0.061) {
tmp = t_1;
} else if (a <= -2.7e-23) {
tmp = x * ((z - a) / t);
} else if (a <= -3.2e-34) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 9.4e-141) {
tmp = y + ((z * (x - y)) / 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 a <= -0.061: tmp = t_1 elif a <= -2.7e-23: tmp = x * ((z - a) / t) elif a <= -3.2e-34: tmp = x + (z * ((y - x) / a)) elif a <= 9.4e-141: tmp = y + ((z * (x - y)) / 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 (a <= -0.061) tmp = t_1; elseif (a <= -2.7e-23) tmp = Float64(x * Float64(Float64(z - a) / t)); elseif (a <= -3.2e-34) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif (a <= 9.4e-141) tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / 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 (a <= -0.061) tmp = t_1; elseif (a <= -2.7e-23) tmp = x * ((z - a) / t); elseif (a <= -3.2e-34) tmp = x + (z * ((y - x) / a)); elseif (a <= 9.4e-141) tmp = y + ((z * (x - y)) / 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[a, -0.061], t$95$1, If[LessEqual[a, -2.7e-23], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.2e-34], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.4e-141], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a \leq -0.061:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-23}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-34}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;a \leq 9.4 \cdot 10^{-141}:\\
\;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.060999999999999999 or 9.3999999999999995e-141 < a Initial program 66.8%
Taylor expanded in y around inf 62.7%
associate-/l*81.0%
Simplified81.0%
if -0.060999999999999999 < a < -2.69999999999999985e-23Initial program 40.4%
Taylor expanded in t around inf 63.6%
associate--l+63.6%
distribute-lft-out--63.6%
div-sub63.6%
mul-1-neg63.6%
unsub-neg63.6%
div-sub63.6%
associate-/l*86.9%
associate-/l*87.1%
distribute-rgt-out--87.1%
Simplified87.1%
Taylor expanded in y around 0 63.8%
associate-/l*87.7%
Simplified87.7%
if -2.69999999999999985e-23 < a < -3.20000000000000003e-34Initial program 99.6%
Taylor expanded in t around 0 99.6%
associate-/l*100.0%
Simplified100.0%
if -3.20000000000000003e-34 < a < 9.3999999999999995e-141Initial program 65.1%
Taylor expanded in t around inf 78.9%
associate--l+78.9%
distribute-lft-out--78.9%
div-sub79.9%
mul-1-neg79.9%
unsub-neg79.9%
div-sub78.9%
associate-/l*82.5%
associate-/l*79.4%
distribute-rgt-out--83.3%
Simplified83.3%
Taylor expanded in z around inf 77.9%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (<= t -6.2e+122)
(/ y (/ (- t a) (- t z)))
(if (<= t -7.1e-214)
t_1
(if (<= t 3.5e-170)
(+ x (* (- y x) (/ (- z t) a)))
(if (<= t 9.4e+207) t_1 (+ y (/ (* x z) t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (t <= -6.2e+122) {
tmp = y / ((t - a) / (t - z));
} else if (t <= -7.1e-214) {
tmp = t_1;
} else if (t <= 3.5e-170) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 9.4e+207) {
tmp = t_1;
} else {
tmp = y + ((x * 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) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / (a - t)))
if (t <= (-6.2d+122)) then
tmp = y / ((t - a) / (t - z))
else if (t <= (-7.1d-214)) then
tmp = t_1
else if (t <= 3.5d-170) then
tmp = x + ((y - x) * ((z - t) / a))
else if (t <= 9.4d+207) then
tmp = t_1
else
tmp = y + ((x * z) / 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 * ((z - t) / (a - t)));
double tmp;
if (t <= -6.2e+122) {
tmp = y / ((t - a) / (t - z));
} else if (t <= -7.1e-214) {
tmp = t_1;
} else if (t <= 3.5e-170) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 9.4e+207) {
tmp = t_1;
} else {
tmp = y + ((x * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if t <= -6.2e+122: tmp = y / ((t - a) / (t - z)) elif t <= -7.1e-214: tmp = t_1 elif t <= 3.5e-170: tmp = x + ((y - x) * ((z - t) / a)) elif t <= 9.4e+207: tmp = t_1 else: tmp = y + ((x * z) / t) 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 (t <= -6.2e+122) tmp = Float64(y / Float64(Float64(t - a) / Float64(t - z))); elseif (t <= -7.1e-214) tmp = t_1; elseif (t <= 3.5e-170) tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / a))); elseif (t <= 9.4e+207) tmp = t_1; else tmp = Float64(y + Float64(Float64(x * z) / t)); 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 (t <= -6.2e+122) tmp = y / ((t - a) / (t - z)); elseif (t <= -7.1e-214) tmp = t_1; elseif (t <= 3.5e-170) tmp = x + ((y - x) * ((z - t) / a)); elseif (t <= 9.4e+207) tmp = t_1; else tmp = y + ((x * z) / t); 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[t, -6.2e+122], N[(y / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.1e-214], t$95$1, If[LessEqual[t, 3.5e-170], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.4e+207], t$95$1, N[(y + N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+122}:\\
\;\;\;\;\frac{y}{\frac{t - a}{t - z}}\\
\mathbf{elif}\;t \leq -7.1 \cdot 10^{-214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-170}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x \cdot z}{t}\\
\end{array}
\end{array}
if t < -6.19999999999999998e122Initial program 32.8%
clear-num32.8%
inv-pow32.8%
*-commutative32.8%
associate-/r*66.4%
Applied egg-rr66.4%
unpow-166.4%
clear-num66.5%
div-sub66.5%
Applied egg-rr66.5%
div-sub66.5%
Simplified66.5%
Taylor expanded in x around 0 38.8%
associate-*l/58.1%
associate-/r/72.5%
Simplified72.5%
if -6.19999999999999998e122 < t < -7.1000000000000001e-214 or 3.49999999999999985e-170 < t < 9.39999999999999951e207Initial program 72.5%
Taylor expanded in y around inf 65.7%
associate-/l*77.7%
Simplified77.7%
if -7.1000000000000001e-214 < t < 3.49999999999999985e-170Initial program 91.1%
Taylor expanded in a around inf 84.6%
associate-/l*93.4%
Simplified93.4%
if 9.39999999999999951e207 < t Initial program 21.9%
Taylor expanded in t around inf 74.4%
associate--l+74.4%
distribute-lft-out--74.4%
div-sub74.4%
mul-1-neg74.4%
unsub-neg74.4%
div-sub74.4%
associate-/l*82.9%
associate-/l*91.6%
distribute-rgt-out--91.6%
Simplified91.6%
Taylor expanded in z around inf 74.9%
Taylor expanded in y around 0 79.3%
mul-1-neg79.3%
distribute-rgt-neg-in79.3%
Simplified79.3%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t)))))
(t_2 (+ y (* (/ (- y x) t) (- a z)))))
(if (<= t -4e+98)
t_2
(if (<= t -1.14e-212)
t_1
(if (<= t 8e-168)
(+ x (* (- y x) (/ (- z t) a)))
(if (<= t 3.2e+137) t_1 t_2))))))
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 + (((y - x) / t) * (a - z));
double tmp;
if (t <= -4e+98) {
tmp = t_2;
} else if (t <= -1.14e-212) {
tmp = t_1;
} else if (t <= 8e-168) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 3.2e+137) {
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 * ((z - t) / (a - t)))
t_2 = y + (((y - x) / t) * (a - z))
if (t <= (-4d+98)) then
tmp = t_2
else if (t <= (-1.14d-212)) then
tmp = t_1
else if (t <= 8d-168) then
tmp = x + ((y - x) * ((z - t) / a))
else if (t <= 3.2d+137) 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 * ((z - t) / (a - t)));
double t_2 = y + (((y - x) / t) * (a - z));
double tmp;
if (t <= -4e+98) {
tmp = t_2;
} else if (t <= -1.14e-212) {
tmp = t_1;
} else if (t <= 8e-168) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 3.2e+137) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) t_2 = y + (((y - x) / t) * (a - z)) tmp = 0 if t <= -4e+98: tmp = t_2 elif t <= -1.14e-212: tmp = t_1 elif t <= 8e-168: tmp = x + ((y - x) * ((z - t) / a)) elif t <= 3.2e+137: tmp = t_1 else: tmp = t_2 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(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))) tmp = 0.0 if (t <= -4e+98) tmp = t_2; elseif (t <= -1.14e-212) tmp = t_1; elseif (t <= 8e-168) tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / a))); elseif (t <= 3.2e+137) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); t_2 = y + (((y - x) / t) * (a - z)); tmp = 0.0; if (t <= -4e+98) tmp = t_2; elseif (t <= -1.14e-212) tmp = t_1; elseif (t <= 8e-168) tmp = x + ((y - x) * ((z - t) / a)); elseif (t <= 3.2e+137) 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[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+98], t$95$2, If[LessEqual[t, -1.14e-212], t$95$1, If[LessEqual[t, 8e-168], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+137], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
t_2 := y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{if}\;t \leq -4 \cdot 10^{+98}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.14 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-168}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.99999999999999999e98 or 3.20000000000000019e137 < t Initial program 29.2%
Taylor expanded in t around inf 66.1%
associate--l+66.1%
distribute-lft-out--66.1%
div-sub66.1%
mul-1-neg66.1%
unsub-neg66.1%
div-sub66.1%
associate-/l*77.2%
associate-/l*86.0%
distribute-rgt-out--86.0%
Simplified86.0%
if -3.99999999999999999e98 < t < -1.13999999999999999e-212 or 8.0000000000000004e-168 < t < 3.20000000000000019e137Initial program 77.5%
Taylor expanded in y around inf 69.2%
associate-/l*79.7%
Simplified79.7%
if -1.13999999999999999e-212 < t < 8.0000000000000004e-168Initial program 91.1%
Taylor expanded in a around inf 84.6%
associate-/l*93.4%
Simplified93.4%
Final simplification84.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.8e+124) (not (<= t 9.5e+207))) (+ y (* (/ (- y x) t) (- a z))) (+ x (/ (- y x) (/ (- t a) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.8e+124) || !(t <= 9.5e+207)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + ((y - x) / ((t - a) / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.8d+124)) .or. (.not. (t <= 9.5d+207))) then
tmp = y + (((y - x) / t) * (a - z))
else
tmp = x + ((y - x) / ((t - a) / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.8e+124) || !(t <= 9.5e+207)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + ((y - x) / ((t - a) / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.8e+124) or not (t <= 9.5e+207): tmp = y + (((y - x) / t) * (a - z)) else: tmp = x + ((y - x) / ((t - a) / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.8e+124) || !(t <= 9.5e+207)) tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(t - a) / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.8e+124) || ~((t <= 9.5e+207))) tmp = y + (((y - x) / t) * (a - z)); else tmp = x + ((y - x) / ((t - a) / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.8e+124], N[Not[LessEqual[t, 9.5e+207]], $MachinePrecision]], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+124} \lor \neg \left(t \leq 9.5 \cdot 10^{+207}\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t - a}{t - z}}\\
\end{array}
\end{array}
if t < -3.7999999999999998e124 or 9.5000000000000005e207 < t Initial program 27.6%
Taylor expanded in t around inf 69.8%
associate--l+69.8%
distribute-lft-out--69.8%
div-sub69.8%
mul-1-neg69.8%
unsub-neg69.8%
div-sub69.8%
associate-/l*80.8%
associate-/l*90.3%
distribute-rgt-out--90.3%
Simplified90.3%
if -3.7999999999999998e124 < t < 9.5000000000000005e207Initial program 77.8%
clear-num77.7%
inv-pow77.7%
*-commutative77.7%
associate-/r*93.0%
Applied egg-rr93.0%
unpow-193.0%
clear-num93.1%
div-sub90.0%
Applied egg-rr90.0%
div-sub93.1%
Simplified93.1%
Final simplification92.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.5e-10) (not (<= x 110000.0))) (* x (+ (/ z (- t a)) 1.0)) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.5e-10) || !(x <= 110000.0)) {
tmp = x * ((z / (t - a)) + 1.0);
} else {
tmp = y * ((z - t) / (a - 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 ((x <= (-6.5d-10)) .or. (.not. (x <= 110000.0d0))) then
tmp = x * ((z / (t - a)) + 1.0d0)
else
tmp = y * ((z - t) / (a - t))
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.5e-10) || !(x <= 110000.0)) {
tmp = x * ((z / (t - a)) + 1.0);
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -6.5e-10) or not (x <= 110000.0): tmp = x * ((z / (t - a)) + 1.0) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.5e-10) || !(x <= 110000.0)) tmp = Float64(x * Float64(Float64(z / Float64(t - a)) + 1.0)); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -6.5e-10) || ~((x <= 110000.0))) tmp = x * ((z / (t - a)) + 1.0); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.5e-10], N[Not[LessEqual[x, 110000.0]], $MachinePrecision]], N[(x * N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-10} \lor \neg \left(x \leq 110000\right):\\
\;\;\;\;x \cdot \left(\frac{z}{t - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if x < -6.5000000000000003e-10 or 1.1e5 < x Initial program 58.2%
Taylor expanded in x around inf 60.1%
mul-1-neg60.1%
unsub-neg60.1%
Simplified60.1%
Taylor expanded in z around inf 59.2%
if -6.5000000000000003e-10 < x < 1.1e5Initial program 73.6%
+-commutative73.6%
associate-/l*92.9%
fma-define93.0%
Simplified93.0%
clear-num92.9%
inv-pow92.9%
Applied egg-rr92.9%
unpow-192.9%
Simplified92.9%
Taylor expanded in y around inf 80.0%
div-sub80.0%
Simplified80.0%
Final simplification69.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.6e-59) (not (<= t 1.8e+29))) (* 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 <= -3.6e-59) || !(t <= 1.8e+29)) {
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 <= (-3.6d-59)) .or. (.not. (t <= 1.8d+29))) 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 <= -3.6e-59) || !(t <= 1.8e+29)) {
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 <= -3.6e-59) or not (t <= 1.8e+29): 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 <= -3.6e-59) || !(t <= 1.8e+29)) 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 <= -3.6e-59) || ~((t <= 1.8e+29))) 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, -3.6e-59], N[Not[LessEqual[t, 1.8e+29]], $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 -3.6 \cdot 10^{-59} \lor \neg \left(t \leq 1.8 \cdot 10^{+29}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if t < -3.6e-59 or 1.79999999999999988e29 < t Initial program 47.9%
+-commutative47.9%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
clear-num75.7%
inv-pow75.7%
Applied egg-rr75.7%
unpow-175.7%
Simplified75.7%
Taylor expanded in y around inf 66.8%
div-sub66.8%
Simplified66.8%
if -3.6e-59 < t < 1.79999999999999988e29Initial program 85.5%
Taylor expanded in t around 0 68.5%
associate-/l*73.4%
Simplified73.4%
Final simplification69.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.6e-58) (not (<= t 1.75e+29))) (* y (/ (- z t) (- a t))) (+ x (/ (- y x) (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.6e-58) || !(t <= 1.75e+29)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((y - x) / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.6d-58)) .or. (.not. (t <= 1.75d+29))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + ((y - x) / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.6e-58) || !(t <= 1.75e+29)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((y - x) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.6e-58) or not (t <= 1.75e+29): tmp = y * ((z - t) / (a - t)) else: tmp = x + ((y - x) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.6e-58) || !(t <= 1.75e+29)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.6e-58) || ~((t <= 1.75e+29))) tmp = y * ((z - t) / (a - t)); else tmp = x + ((y - x) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.6e-58], N[Not[LessEqual[t, 1.75e+29]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-58} \lor \neg \left(t \leq 1.75 \cdot 10^{+29}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -3.60000000000000009e-58 or 1.74999999999999989e29 < t Initial program 47.9%
+-commutative47.9%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
clear-num75.7%
inv-pow75.7%
Applied egg-rr75.7%
unpow-175.7%
Simplified75.7%
Taylor expanded in y around inf 66.8%
div-sub66.8%
Simplified66.8%
if -3.60000000000000009e-58 < t < 1.74999999999999989e29Initial program 85.5%
clear-num85.4%
inv-pow85.4%
*-commutative85.4%
associate-/r*95.6%
Applied egg-rr95.6%
unpow-195.6%
clear-num95.7%
div-sub90.8%
Applied egg-rr90.8%
div-sub95.7%
Simplified95.7%
Taylor expanded in t around 0 78.5%
Final simplification72.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.6e-58)
(* y (- 1.0 (/ z t)))
(if (<= t 18000000000000.0)
(* x (+ (/ z (- t a)) 1.0))
(+ y (/ (* x z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e-58) {
tmp = y * (1.0 - (z / t));
} else if (t <= 18000000000000.0) {
tmp = x * ((z / (t - a)) + 1.0);
} else {
tmp = y + ((x * 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 <= (-5.6d-58)) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 18000000000000.0d0) then
tmp = x * ((z / (t - a)) + 1.0d0)
else
tmp = y + ((x * 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 <= -5.6e-58) {
tmp = y * (1.0 - (z / t));
} else if (t <= 18000000000000.0) {
tmp = x * ((z / (t - a)) + 1.0);
} else {
tmp = y + ((x * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.6e-58: tmp = y * (1.0 - (z / t)) elif t <= 18000000000000.0: tmp = x * ((z / (t - a)) + 1.0) else: tmp = y + ((x * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e-58) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 18000000000000.0) tmp = Float64(x * Float64(Float64(z / Float64(t - a)) + 1.0)); else tmp = Float64(y + Float64(Float64(x * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.6e-58) tmp = y * (1.0 - (z / t)); elseif (t <= 18000000000000.0) tmp = x * ((z / (t - a)) + 1.0); else tmp = y + ((x * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e-58], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 18000000000000.0], N[(x * N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{-58}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 18000000000000:\\
\;\;\;\;x \cdot \left(\frac{z}{t - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x \cdot z}{t}\\
\end{array}
\end{array}
if t < -5.6000000000000001e-58Initial program 51.8%
Taylor expanded in y around inf 69.6%
Taylor expanded in a around 0 58.1%
associate-*r/58.1%
mul-1-neg58.1%
Simplified58.1%
if -5.6000000000000001e-58 < t < 1.8e13Initial program 85.8%
Taylor expanded in x around inf 60.8%
mul-1-neg60.8%
unsub-neg60.8%
Simplified60.8%
Taylor expanded in z around inf 60.2%
if 1.8e13 < t Initial program 45.2%
Taylor expanded in t around inf 59.2%
associate--l+59.2%
distribute-lft-out--59.2%
div-sub59.2%
mul-1-neg59.2%
unsub-neg59.2%
div-sub59.2%
associate-/l*66.5%
associate-/l*72.7%
distribute-rgt-out--72.7%
Simplified72.7%
Taylor expanded in z around inf 57.9%
Taylor expanded in y around 0 56.2%
mul-1-neg56.2%
distribute-rgt-neg-in56.2%
Simplified56.2%
Final simplification58.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.5e-58) (/ y (/ (- t a) (- t z))) (if (<= t 2.6e+29) (+ x (/ (- y x) (/ a z))) (* y (/ (- z t) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e-58) {
tmp = y / ((t - a) / (t - z));
} else if (t <= 2.6e+29) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = y * ((z - t) / (a - 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 <= (-4.5d-58)) then
tmp = y / ((t - a) / (t - z))
else if (t <= 2.6d+29) then
tmp = x + ((y - x) / (a / z))
else
tmp = y * ((z - t) / (a - 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 <= -4.5e-58) {
tmp = y / ((t - a) / (t - z));
} else if (t <= 2.6e+29) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.5e-58: tmp = y / ((t - a) / (t - z)) elif t <= 2.6e+29: tmp = x + ((y - x) / (a / z)) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e-58) tmp = Float64(y / Float64(Float64(t - a) / Float64(t - z))); elseif (t <= 2.6e+29) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.5e-58) tmp = y / ((t - a) / (t - z)); elseif (t <= 2.6e+29) tmp = x + ((y - x) / (a / z)); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e-58], N[(y / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+29], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{y}{\frac{t - a}{t - z}}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+29}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if t < -4.5000000000000003e-58Initial program 51.8%
clear-num51.8%
inv-pow51.8%
*-commutative51.8%
associate-/r*76.9%
Applied egg-rr76.9%
unpow-176.9%
clear-num77.0%
div-sub77.0%
Applied egg-rr77.0%
div-sub77.0%
Simplified77.0%
Taylor expanded in x around 0 49.5%
associate-*l/59.6%
associate-/r/69.6%
Simplified69.6%
if -4.5000000000000003e-58 < t < 2.6e29Initial program 85.5%
clear-num85.4%
inv-pow85.4%
*-commutative85.4%
associate-/r*95.6%
Applied egg-rr95.6%
unpow-195.6%
clear-num95.7%
div-sub90.8%
Applied egg-rr90.8%
div-sub95.7%
Simplified95.7%
Taylor expanded in t around 0 78.5%
if 2.6e29 < t Initial program 43.2%
+-commutative43.2%
associate-/l*74.3%
fma-define74.3%
Simplified74.3%
clear-num74.1%
inv-pow74.1%
Applied egg-rr74.1%
unpow-174.1%
Simplified74.1%
Taylor expanded in y around inf 63.3%
div-sub63.3%
Simplified63.3%
Final simplification72.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.6e-58) (not (<= t 2.1e+51))) (- y (/ (* y z) t)) (* x (- 1.0 (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.6e-58) || !(t <= 2.1e+51)) {
tmp = y - ((y * z) / 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 ((t <= (-4.6d-58)) .or. (.not. (t <= 2.1d+51))) then
tmp = y - ((y * z) / 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 ((t <= -4.6e-58) || !(t <= 2.1e+51)) {
tmp = y - ((y * z) / t);
} else {
tmp = x * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.6e-58) or not (t <= 2.1e+51): tmp = y - ((y * z) / t) else: tmp = x * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.6e-58) || !(t <= 2.1e+51)) tmp = Float64(y - Float64(Float64(y * z) / 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 ((t <= -4.6e-58) || ~((t <= 2.1e+51))) tmp = y - ((y * z) / t); else tmp = x * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.6e-58], N[Not[LessEqual[t, 2.1e+51]], $MachinePrecision]], N[(y - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-58} \lor \neg \left(t \leq 2.1 \cdot 10^{+51}\right):\\
\;\;\;\;y - \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if t < -4.5999999999999998e-58 or 2.1000000000000001e51 < t Initial program 48.5%
Taylor expanded in t around inf 61.2%
associate--l+61.2%
distribute-lft-out--61.2%
div-sub61.2%
mul-1-neg61.2%
unsub-neg61.2%
div-sub61.2%
associate-/l*69.1%
associate-/l*74.3%
distribute-rgt-out--75.1%
Simplified75.1%
Taylor expanded in z around inf 60.2%
Taylor expanded in y around inf 50.2%
if -4.5999999999999998e-58 < t < 2.1000000000000001e51Initial program 83.7%
Taylor expanded in x around inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
Taylor expanded in t around 0 52.0%
Final simplification51.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.66e-59) (not (<= t 1.85e+29))) (* y (- 1.0 (/ z t))) (* x (- 1.0 (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.66e-59) || !(t <= 1.85e+29)) {
tmp = y * (1.0 - (z / 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 ((t <= (-1.66d-59)) .or. (.not. (t <= 1.85d+29))) then
tmp = y * (1.0d0 - (z / 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 ((t <= -1.66e-59) || !(t <= 1.85e+29)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.66e-59) or not (t <= 1.85e+29): tmp = y * (1.0 - (z / t)) else: tmp = x * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.66e-59) || !(t <= 1.85e+29)) tmp = Float64(y * Float64(1.0 - Float64(z / 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 ((t <= -1.66e-59) || ~((t <= 1.85e+29))) tmp = y * (1.0 - (z / t)); else tmp = x * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.66e-59], N[Not[LessEqual[t, 1.85e+29]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.66 \cdot 10^{-59} \lor \neg \left(t \leq 1.85 \cdot 10^{+29}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if t < -1.66e-59 or 1.84999999999999987e29 < t Initial program 47.9%
Taylor expanded in y around inf 66.8%
Taylor expanded in a around 0 55.8%
associate-*r/55.8%
mul-1-neg55.8%
Simplified55.8%
if -1.66e-59 < t < 1.84999999999999987e29Initial program 85.5%
Taylor expanded in x around inf 60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
Taylor expanded in t around 0 52.8%
Final simplification54.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.6e-58) y (if (<= t 2.4e+119) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e-58) {
tmp = y;
} else if (t <= 2.4e+119) {
tmp = x * (1.0 - (z / a));
} 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 (t <= (-5.6d-58)) then
tmp = y
else if (t <= 2.4d+119) then
tmp = x * (1.0d0 - (z / a))
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 (t <= -5.6e-58) {
tmp = y;
} else if (t <= 2.4e+119) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.6e-58: tmp = y elif t <= 2.4e+119: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e-58) tmp = y; elseif (t <= 2.4e+119) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.6e-58) tmp = y; elseif (t <= 2.4e+119) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e-58], y, If[LessEqual[t, 2.4e+119], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{-58}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+119}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -5.6000000000000001e-58 or 2.4e119 < t Initial program 44.7%
Taylor expanded in t around inf 50.1%
if -5.6000000000000001e-58 < t < 2.4e119Initial program 83.4%
Taylor expanded in x around inf 56.1%
mul-1-neg56.1%
unsub-neg56.1%
Simplified56.1%
Taylor expanded in t around 0 49.5%
Final simplification49.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.82e-59) (* y (- 1.0 (/ z t))) (if (<= t 2.7e+18) (* x (- 1.0 (/ z a))) (+ y (/ (* x z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.82e-59) {
tmp = y * (1.0 - (z / t));
} else if (t <= 2.7e+18) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y + ((x * 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 <= (-1.82d-59)) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 2.7d+18) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y + ((x * 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 <= -1.82e-59) {
tmp = y * (1.0 - (z / t));
} else if (t <= 2.7e+18) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y + ((x * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.82e-59: tmp = y * (1.0 - (z / t)) elif t <= 2.7e+18: tmp = x * (1.0 - (z / a)) else: tmp = y + ((x * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.82e-59) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 2.7e+18) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = Float64(y + Float64(Float64(x * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.82e-59) tmp = y * (1.0 - (z / t)); elseif (t <= 2.7e+18) tmp = x * (1.0 - (z / a)); else tmp = y + ((x * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.82e-59], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+18], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.82 \cdot 10^{-59}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x \cdot z}{t}\\
\end{array}
\end{array}
if t < -1.8199999999999999e-59Initial program 51.8%
Taylor expanded in y around inf 69.6%
Taylor expanded in a around 0 58.1%
associate-*r/58.1%
mul-1-neg58.1%
Simplified58.1%
if -1.8199999999999999e-59 < t < 2.7e18Initial program 85.8%
Taylor expanded in x around inf 60.8%
mul-1-neg60.8%
unsub-neg60.8%
Simplified60.8%
Taylor expanded in t around 0 52.9%
if 2.7e18 < t Initial program 45.2%
Taylor expanded in t around inf 59.2%
associate--l+59.2%
distribute-lft-out--59.2%
div-sub59.2%
mul-1-neg59.2%
unsub-neg59.2%
div-sub59.2%
associate-/l*66.5%
associate-/l*72.7%
distribute-rgt-out--72.7%
Simplified72.7%
Taylor expanded in z around inf 57.9%
Taylor expanded in y around 0 56.2%
mul-1-neg56.2%
distribute-rgt-neg-in56.2%
Simplified56.2%
Final simplification55.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.55e-77) y (if (<= t 1.4e-173) (* y (/ z a)) (if (<= t 4.5e+45) x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e-77) {
tmp = y;
} else if (t <= 1.4e-173) {
tmp = y * (z / a);
} else if (t <= 4.5e+45) {
tmp = x;
} 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 (t <= (-1.55d-77)) then
tmp = y
else if (t <= 1.4d-173) then
tmp = y * (z / a)
else if (t <= 4.5d+45) then
tmp = x
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 (t <= -1.55e-77) {
tmp = y;
} else if (t <= 1.4e-173) {
tmp = y * (z / a);
} else if (t <= 4.5e+45) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.55e-77: tmp = y elif t <= 1.4e-173: tmp = y * (z / a) elif t <= 4.5e+45: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.55e-77) tmp = y; elseif (t <= 1.4e-173) tmp = Float64(y * Float64(z / a)); elseif (t <= 4.5e+45) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.55e-77) tmp = y; elseif (t <= 1.4e-173) tmp = y * (z / a); elseif (t <= 4.5e+45) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e-77], y, If[LessEqual[t, 1.4e-173], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+45], x, y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-77}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-173}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.55000000000000004e-77 or 4.4999999999999998e45 < t Initial program 49.0%
Taylor expanded in t around inf 46.4%
if -1.55000000000000004e-77 < t < 1.39999999999999995e-173Initial program 87.7%
Taylor expanded in y around inf 44.4%
Taylor expanded in t around 0 30.9%
associate-/l*37.4%
Simplified37.4%
if 1.39999999999999995e-173 < t < 4.4999999999999998e45Initial program 75.1%
Taylor expanded in a around inf 39.9%
Final simplification42.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.8e-61) y (if (<= t 1.95e+45) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.8e-61) {
tmp = y;
} else if (t <= 1.95e+45) {
tmp = x;
} 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 (t <= (-1.8d-61)) then
tmp = y
else if (t <= 1.95d+45) then
tmp = x
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 (t <= -1.8e-61) {
tmp = y;
} else if (t <= 1.95e+45) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.8e-61: tmp = y elif t <= 1.95e+45: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.8e-61) tmp = y; elseif (t <= 1.95e+45) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.8e-61) tmp = y; elseif (t <= 1.95e+45) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.8e-61], y, If[LessEqual[t, 1.95e+45], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-61}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.80000000000000007e-61 or 1.95e45 < t Initial program 48.6%
Taylor expanded in t around inf 46.7%
if -1.80000000000000007e-61 < t < 1.95e45Initial program 84.2%
Taylor expanded in a around inf 34.5%
Final simplification40.8%
(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 65.8%
Taylor expanded in a around inf 24.1%
Final simplification24.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 2024076
(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))))