
(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 19 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.4e+93) (not (<= t 2.2e+145))) (+ 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.4e+93) || !(t <= 2.2e+145)) {
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.4e+93) || !(t <= 2.2e+145)) 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.4e+93], N[Not[LessEqual[t, 2.2e+145]], $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.4 \cdot 10^{+93} \lor \neg \left(t \leq 2.2 \cdot 10^{+145}\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.4e93 or 2.20000000000000009e145 < t Initial program 37.5%
Taylor expanded in t around inf 69.0%
associate--l+69.0%
distribute-lft-out--69.0%
div-sub69.0%
mul-1-neg69.0%
unsub-neg69.0%
div-sub69.0%
associate-/l*82.0%
associate-/l*91.4%
distribute-rgt-out--91.4%
Simplified91.4%
if -3.4e93 < t < 2.20000000000000009e145Initial program 85.6%
+-commutative85.6%
associate-/l*94.2%
fma-define94.2%
Simplified94.2%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (/ (- y x) t) (- a z)))))
(if (<= t -2.2e+92)
t_1
(if (<= t -2.7e-164)
(+ x (* x (* (/ (- z t) (- a t)) (+ -1.0 (/ y x)))))
(if (<= t 0.26)
(+ x (/ (* (- y x) (- z t)) (- a t)))
(if (<= t 1.02e+145)
(*
y
(+
(+ (+ (/ z (- a t)) (/ x y)) (* x (/ (- t z) (* y (- a t)))))
(/ t (- t a))))
t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (((y - x) / t) * (a - z));
double tmp;
if (t <= -2.2e+92) {
tmp = t_1;
} else if (t <= -2.7e-164) {
tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x))));
} else if (t <= 0.26) {
tmp = x + (((y - x) * (z - t)) / (a - t));
} else if (t <= 1.02e+145) {
tmp = y * ((((z / (a - t)) + (x / y)) + (x * ((t - z) / (y * (a - t))))) + (t / (t - 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 = y + (((y - x) / t) * (a - z))
if (t <= (-2.2d+92)) then
tmp = t_1
else if (t <= (-2.7d-164)) then
tmp = x + (x * (((z - t) / (a - t)) * ((-1.0d0) + (y / x))))
else if (t <= 0.26d0) then
tmp = x + (((y - x) * (z - t)) / (a - t))
else if (t <= 1.02d+145) then
tmp = y * ((((z / (a - t)) + (x / y)) + (x * ((t - z) / (y * (a - t))))) + (t / (t - 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 = y + (((y - x) / t) * (a - z));
double tmp;
if (t <= -2.2e+92) {
tmp = t_1;
} else if (t <= -2.7e-164) {
tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x))));
} else if (t <= 0.26) {
tmp = x + (((y - x) * (z - t)) / (a - t));
} else if (t <= 1.02e+145) {
tmp = y * ((((z / (a - t)) + (x / y)) + (x * ((t - z) / (y * (a - t))))) + (t / (t - a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (((y - x) / t) * (a - z)) tmp = 0 if t <= -2.2e+92: tmp = t_1 elif t <= -2.7e-164: tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x)))) elif t <= 0.26: tmp = x + (((y - x) * (z - t)) / (a - t)) elif t <= 1.02e+145: tmp = y * ((((z / (a - t)) + (x / y)) + (x * ((t - z) / (y * (a - t))))) + (t / (t - a))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))) tmp = 0.0 if (t <= -2.2e+92) tmp = t_1; elseif (t <= -2.7e-164) tmp = Float64(x + Float64(x * Float64(Float64(Float64(z - t) / Float64(a - t)) * Float64(-1.0 + Float64(y / x))))); elseif (t <= 0.26) tmp = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))); elseif (t <= 1.02e+145) tmp = Float64(y * Float64(Float64(Float64(Float64(z / Float64(a - t)) + Float64(x / y)) + Float64(x * Float64(Float64(t - z) / Float64(y * Float64(a - t))))) + Float64(t / Float64(t - a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (((y - x) / t) * (a - z)); tmp = 0.0; if (t <= -2.2e+92) tmp = t_1; elseif (t <= -2.7e-164) tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x)))); elseif (t <= 0.26) tmp = x + (((y - x) * (z - t)) / (a - t)); elseif (t <= 1.02e+145) tmp = y * ((((z / (a - t)) + (x / y)) + (x * ((t - z) / (y * (a - t))))) + (t / (t - a))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+92], t$95$1, If[LessEqual[t, -2.7e-164], N[(x + N[(x * N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.26], N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e+145], N[(y * N[(N[(N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(t - z), $MachinePrecision] / N[(y * N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-164}:\\
\;\;\;\;x + x \cdot \left(\frac{z - t}{a - t} \cdot \left(-1 + \frac{y}{x}\right)\right)\\
\mathbf{elif}\;t \leq 0.26:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+145}:\\
\;\;\;\;y \cdot \left(\left(\left(\frac{z}{a - t} + \frac{x}{y}\right) + x \cdot \frac{t - z}{y \cdot \left(a - t\right)}\right) + \frac{t}{t - a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.19999999999999992e92 or 1.02e145 < t Initial program 37.5%
Taylor expanded in t around inf 69.0%
associate--l+69.0%
distribute-lft-out--69.0%
div-sub69.0%
mul-1-neg69.0%
unsub-neg69.0%
div-sub69.0%
associate-/l*82.0%
associate-/l*91.4%
distribute-rgt-out--91.4%
Simplified91.4%
if -2.19999999999999992e92 < t < -2.7000000000000001e-164Initial program 81.1%
Taylor expanded in x around inf 77.5%
times-frac88.6%
distribute-rgt-out88.6%
Simplified88.6%
if -2.7000000000000001e-164 < t < 0.26000000000000001Initial program 95.1%
if 0.26000000000000001 < t < 1.02e145Initial program 63.4%
clear-num63.5%
inv-pow63.5%
*-commutative63.5%
associate-/r*82.9%
Applied egg-rr82.9%
unpow-182.9%
associate-/l/63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in y around inf 80.7%
+-commutative80.7%
mul-1-neg80.7%
unsub-neg80.7%
+-commutative80.7%
associate-/l*87.3%
Simplified87.3%
Final simplification91.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ z (- a)))) (t_2 (* y (/ z a))))
(if (<= z -3.7e+178)
t_2
(if (<= z -4.5e+152)
t_1
(if (<= z -5e+124)
t_2
(if (<= z -1.95e+96)
(+ y x)
(if (<= z -2.85e+76) t_1 (if (<= z 5.6e+59) (+ y x) t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (z / -a);
double t_2 = y * (z / a);
double tmp;
if (z <= -3.7e+178) {
tmp = t_2;
} else if (z <= -4.5e+152) {
tmp = t_1;
} else if (z <= -5e+124) {
tmp = t_2;
} else if (z <= -1.95e+96) {
tmp = y + x;
} else if (z <= -2.85e+76) {
tmp = t_1;
} else if (z <= 5.6e+59) {
tmp = y + x;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (z / -a)
t_2 = y * (z / a)
if (z <= (-3.7d+178)) then
tmp = t_2
else if (z <= (-4.5d+152)) then
tmp = t_1
else if (z <= (-5d+124)) then
tmp = t_2
else if (z <= (-1.95d+96)) then
tmp = y + x
else if (z <= (-2.85d+76)) then
tmp = t_1
else if (z <= 5.6d+59) then
tmp = y + x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (z / -a);
double t_2 = y * (z / a);
double tmp;
if (z <= -3.7e+178) {
tmp = t_2;
} else if (z <= -4.5e+152) {
tmp = t_1;
} else if (z <= -5e+124) {
tmp = t_2;
} else if (z <= -1.95e+96) {
tmp = y + x;
} else if (z <= -2.85e+76) {
tmp = t_1;
} else if (z <= 5.6e+59) {
tmp = y + x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (z / -a) t_2 = y * (z / a) tmp = 0 if z <= -3.7e+178: tmp = t_2 elif z <= -4.5e+152: tmp = t_1 elif z <= -5e+124: tmp = t_2 elif z <= -1.95e+96: tmp = y + x elif z <= -2.85e+76: tmp = t_1 elif z <= 5.6e+59: tmp = y + x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(z / Float64(-a))) t_2 = Float64(y * Float64(z / a)) tmp = 0.0 if (z <= -3.7e+178) tmp = t_2; elseif (z <= -4.5e+152) tmp = t_1; elseif (z <= -5e+124) tmp = t_2; elseif (z <= -1.95e+96) tmp = Float64(y + x); elseif (z <= -2.85e+76) tmp = t_1; elseif (z <= 5.6e+59) tmp = Float64(y + x); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (z / -a); t_2 = y * (z / a); tmp = 0.0; if (z <= -3.7e+178) tmp = t_2; elseif (z <= -4.5e+152) tmp = t_1; elseif (z <= -5e+124) tmp = t_2; elseif (z <= -1.95e+96) tmp = y + x; elseif (z <= -2.85e+76) tmp = t_1; elseif (z <= 5.6e+59) tmp = y + x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e+178], t$95$2, If[LessEqual[z, -4.5e+152], t$95$1, If[LessEqual[z, -5e+124], t$95$2, If[LessEqual[z, -1.95e+96], N[(y + x), $MachinePrecision], If[LessEqual[z, -2.85e+76], t$95$1, If[LessEqual[z, 5.6e+59], N[(y + x), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{-a}\\
t_2 := y \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+178}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+124}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{+96}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -2.85 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+59}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.7000000000000002e178 or -4.5000000000000001e152 < z < -4.9999999999999996e124 or 5.5999999999999996e59 < z Initial program 71.5%
Taylor expanded in t around 0 53.9%
Taylor expanded in y around inf 43.8%
Taylor expanded in x around 0 34.5%
associate-*r/42.9%
Simplified42.9%
if -3.7000000000000002e178 < z < -4.5000000000000001e152 or -1.95e96 < z < -2.85000000000000002e76Initial program 83.1%
Taylor expanded in t around 0 70.5%
Taylor expanded in y around 0 54.2%
mul-1-neg54.2%
unsub-neg54.2%
associate-/l*64.9%
Simplified64.9%
Taylor expanded in z around inf 51.7%
associate-*r/62.3%
neg-mul-162.3%
distribute-rgt-neg-in62.3%
distribute-neg-frac62.3%
Simplified62.3%
if -4.9999999999999996e124 < z < -1.95e96 or -2.85000000000000002e76 < z < 5.5999999999999996e59Initial program 73.1%
Taylor expanded in z around 0 60.3%
mul-1-neg60.3%
unsub-neg60.3%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in y around inf 64.8%
Taylor expanded in t around inf 48.5%
mul-1-neg48.5%
Simplified48.5%
Final simplification47.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+89)
(+ y (/ (* z (- x y)) t))
(if (or (<= t -2.2e+68) (and (not (<= t -1.35e+33)) (<= t 1.9e+45)))
(+ x (* z (/ (- y x) a)))
(* y (/ (- z t) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+89) {
tmp = y + ((z * (x - y)) / t);
} else if ((t <= -2.2e+68) || (!(t <= -1.35e+33) && (t <= 1.9e+45))) {
tmp = x + (z * ((y - x) / a));
} 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 <= (-6.2d+89)) then
tmp = y + ((z * (x - y)) / t)
else if ((t <= (-2.2d+68)) .or. (.not. (t <= (-1.35d+33))) .and. (t <= 1.9d+45)) then
tmp = x + (z * ((y - x) / a))
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 <= -6.2e+89) {
tmp = y + ((z * (x - y)) / t);
} else if ((t <= -2.2e+68) || (!(t <= -1.35e+33) && (t <= 1.9e+45))) {
tmp = x + (z * ((y - x) / a));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+89: tmp = y + ((z * (x - y)) / t) elif (t <= -2.2e+68) or (not (t <= -1.35e+33) and (t <= 1.9e+45)): tmp = x + (z * ((y - x) / a)) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+89) tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t)); elseif ((t <= -2.2e+68) || (!(t <= -1.35e+33) && (t <= 1.9e+45))) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); 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 <= -6.2e+89) tmp = y + ((z * (x - y)) / t); elseif ((t <= -2.2e+68) || (~((t <= -1.35e+33)) && (t <= 1.9e+45))) tmp = x + (z * ((y - x) / a)); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+89], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.2e+68], And[N[Not[LessEqual[t, -1.35e+33]], $MachinePrecision], LessEqual[t, 1.9e+45]]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $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 -6.2 \cdot 10^{+89}:\\
\;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{+68} \lor \neg \left(t \leq -1.35 \cdot 10^{+33}\right) \land t \leq 1.9 \cdot 10^{+45}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if t < -6.2e89Initial program 40.7%
Taylor expanded in t around inf 68.3%
associate--l+68.3%
distribute-lft-out--68.3%
div-sub68.3%
mul-1-neg68.3%
unsub-neg68.3%
div-sub68.3%
associate-/l*79.5%
associate-/l*86.4%
distribute-rgt-out--86.4%
Simplified86.4%
Taylor expanded in z around inf 60.5%
if -6.2e89 < t < -2.19999999999999987e68 or -1.34999999999999996e33 < t < 1.9000000000000001e45Initial program 87.6%
Taylor expanded in t around 0 72.0%
associate-/l*75.7%
Simplified75.7%
if -2.19999999999999987e68 < t < -1.34999999999999996e33 or 1.9000000000000001e45 < t Initial program 55.3%
Taylor expanded in x around 0 63.3%
+-commutative63.3%
+-commutative63.3%
distribute-lft-in63.4%
mul-1-neg63.4%
distribute-rgt-neg-in63.4%
associate-/l*60.2%
mul-1-neg60.2%
*-rgt-identity60.2%
associate-+l+55.3%
Simplified74.4%
Taylor expanded in y around inf 76.9%
div-sub76.9%
Simplified76.9%
Final simplification74.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ x (* y (/ z a)))))
(if (<= a -2.6e+89)
t_2
(if (<= a 6.3e-59)
t_1
(if (<= a 5.6e+74)
(- x (* x (/ z a)))
(if (<= a 3.25e+128) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double t_2 = x + (y * (z / a));
double tmp;
if (a <= -2.6e+89) {
tmp = t_2;
} else if (a <= 6.3e-59) {
tmp = t_1;
} else if (a <= 5.6e+74) {
tmp = x - (x * (z / a));
} else if (a <= 3.25e+128) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
t_2 = x + (y * (z / a))
if (a <= (-2.6d+89)) then
tmp = t_2
else if (a <= 6.3d-59) then
tmp = t_1
else if (a <= 5.6d+74) then
tmp = x - (x * (z / a))
else if (a <= 3.25d+128) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double t_2 = x + (y * (z / a));
double tmp;
if (a <= -2.6e+89) {
tmp = t_2;
} else if (a <= 6.3e-59) {
tmp = t_1;
} else if (a <= 5.6e+74) {
tmp = x - (x * (z / a));
} else if (a <= 3.25e+128) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) t_2 = x + (y * (z / a)) tmp = 0 if a <= -2.6e+89: tmp = t_2 elif a <= 6.3e-59: tmp = t_1 elif a <= 5.6e+74: tmp = x - (x * (z / a)) elif a <= 3.25e+128: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) t_2 = Float64(x + Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -2.6e+89) tmp = t_2; elseif (a <= 6.3e-59) tmp = t_1; elseif (a <= 5.6e+74) tmp = Float64(x - Float64(x * Float64(z / a))); elseif (a <= 3.25e+128) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); t_2 = x + (y * (z / a)); tmp = 0.0; if (a <= -2.6e+89) tmp = t_2; elseif (a <= 6.3e-59) tmp = t_1; elseif (a <= 5.6e+74) tmp = x - (x * (z / a)); elseif (a <= 3.25e+128) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+89], t$95$2, If[LessEqual[a, 6.3e-59], t$95$1, If[LessEqual[a, 5.6e+74], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.25e+128], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
t_2 := x + y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 6.3 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{+74}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 3.25 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.6000000000000001e89 or 3.25000000000000015e128 < a Initial program 74.9%
Taylor expanded in t around 0 69.3%
Taylor expanded in y around inf 69.5%
associate-/l*77.2%
Simplified77.2%
if -2.6000000000000001e89 < a < 6.3000000000000003e-59 or 5.60000000000000003e74 < a < 3.25000000000000015e128Initial program 70.4%
Taylor expanded in x around 0 72.6%
+-commutative72.6%
+-commutative72.6%
distribute-lft-in72.7%
mul-1-neg72.7%
distribute-rgt-neg-in72.7%
associate-/l*73.1%
mul-1-neg73.1%
*-rgt-identity73.1%
associate-+l+68.9%
Simplified74.9%
Taylor expanded in y around inf 68.0%
div-sub68.0%
Simplified68.0%
if 6.3000000000000003e-59 < a < 5.60000000000000003e74Initial program 84.1%
Taylor expanded in t around 0 64.0%
Taylor expanded in y around 0 64.2%
mul-1-neg64.2%
unsub-neg64.2%
associate-/l*64.2%
Simplified64.2%
Final simplification70.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (* (/ x t) (- a z)))))
(if (<= t -6.2e+90)
t_1
(if (<= t 4.5e-177)
(+ x (* (- y x) (/ (- z t) a)))
(if (<= t 1.8e+45)
(+ x (/ (* (- y x) z) (- a t)))
(if (<= t 2.5e+158) (* y (/ (- z t) (- a t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - ((x / t) * (a - z));
double tmp;
if (t <= -6.2e+90) {
tmp = t_1;
} else if (t <= 4.5e-177) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 1.8e+45) {
tmp = x + (((y - x) * z) / (a - t));
} else if (t <= 2.5e+158) {
tmp = y * ((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 = y - ((x / t) * (a - z))
if (t <= (-6.2d+90)) then
tmp = t_1
else if (t <= 4.5d-177) then
tmp = x + ((y - x) * ((z - t) / a))
else if (t <= 1.8d+45) then
tmp = x + (((y - x) * z) / (a - t))
else if (t <= 2.5d+158) then
tmp = y * ((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 = y - ((x / t) * (a - z));
double tmp;
if (t <= -6.2e+90) {
tmp = t_1;
} else if (t <= 4.5e-177) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 1.8e+45) {
tmp = x + (((y - x) * z) / (a - t));
} else if (t <= 2.5e+158) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - ((x / t) * (a - z)) tmp = 0 if t <= -6.2e+90: tmp = t_1 elif t <= 4.5e-177: tmp = x + ((y - x) * ((z - t) / a)) elif t <= 1.8e+45: tmp = x + (((y - x) * z) / (a - t)) elif t <= 2.5e+158: tmp = y * ((z - t) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(Float64(x / t) * Float64(a - z))) tmp = 0.0 if (t <= -6.2e+90) tmp = t_1; elseif (t <= 4.5e-177) tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / a))); elseif (t <= 1.8e+45) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / Float64(a - t))); elseif (t <= 2.5e+158) tmp = Float64(y * Float64(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 = y - ((x / t) * (a - z)); tmp = 0.0; if (t <= -6.2e+90) tmp = t_1; elseif (t <= 4.5e-177) tmp = x + ((y - x) * ((z - t) / a)); elseif (t <= 1.8e+45) tmp = x + (((y - x) * z) / (a - t)); elseif (t <= 2.5e+158) tmp = y * ((z - t) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(N[(x / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+90], t$95$1, If[LessEqual[t, 4.5e-177], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+45], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+158], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{x}{t} \cdot \left(a - z\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-177}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+45}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+158}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.19999999999999977e90 or 2.4999999999999998e158 < t Initial program 37.5%
Taylor expanded in t around inf 69.0%
associate--l+69.0%
distribute-lft-out--69.0%
div-sub69.0%
mul-1-neg69.0%
unsub-neg69.0%
div-sub69.0%
associate-/l*81.2%
associate-/l*91.0%
distribute-rgt-out--91.0%
Simplified91.0%
Taylor expanded in y around 0 81.2%
associate-*r/81.2%
neg-mul-181.2%
Simplified81.2%
if -6.19999999999999977e90 < t < 4.5000000000000003e-177Initial program 88.4%
Taylor expanded in a around inf 77.8%
associate-/l*84.7%
Simplified84.7%
if 4.5000000000000003e-177 < t < 1.8e45Initial program 86.9%
Taylor expanded in z around inf 82.2%
if 1.8e45 < t < 2.4999999999999998e158Initial program 62.9%
Taylor expanded in x around 0 68.3%
+-commutative68.3%
+-commutative68.3%
distribute-lft-in68.3%
mul-1-neg68.3%
distribute-rgt-neg-in68.3%
associate-/l*68.2%
mul-1-neg68.2%
*-rgt-identity68.2%
associate-+l+62.8%
Simplified86.4%
Taylor expanded in y around inf 76.4%
div-sub76.4%
Simplified76.4%
Final simplification82.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (/ (- y x) t) (- a z)))))
(if (<= t -2.7e+93)
t_1
(if (<= t -2e-160)
(+ x (* x (* (/ (- z t) (- a t)) (+ -1.0 (/ y x)))))
(if (<= t 1.1e+83) (+ x (/ (* (- y x) (- z t)) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (((y - x) / t) * (a - z));
double tmp;
if (t <= -2.7e+93) {
tmp = t_1;
} else if (t <= -2e-160) {
tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x))));
} else if (t <= 1.1e+83) {
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 = y + (((y - x) / t) * (a - z))
if (t <= (-2.7d+93)) then
tmp = t_1
else if (t <= (-2d-160)) then
tmp = x + (x * (((z - t) / (a - t)) * ((-1.0d0) + (y / x))))
else if (t <= 1.1d+83) 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 = y + (((y - x) / t) * (a - z));
double tmp;
if (t <= -2.7e+93) {
tmp = t_1;
} else if (t <= -2e-160) {
tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x))));
} else if (t <= 1.1e+83) {
tmp = x + (((y - x) * (z - t)) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (((y - x) / t) * (a - z)) tmp = 0 if t <= -2.7e+93: tmp = t_1 elif t <= -2e-160: tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x)))) elif t <= 1.1e+83: tmp = x + (((y - x) * (z - t)) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))) tmp = 0.0 if (t <= -2.7e+93) tmp = t_1; elseif (t <= -2e-160) tmp = Float64(x + Float64(x * Float64(Float64(Float64(z - t) / Float64(a - t)) * Float64(-1.0 + Float64(y / x))))); elseif (t <= 1.1e+83) 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 = y + (((y - x) / t) * (a - z)); tmp = 0.0; if (t <= -2.7e+93) tmp = t_1; elseif (t <= -2e-160) tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x)))); elseif (t <= 1.1e+83) 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[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+93], t$95$1, If[LessEqual[t, -2e-160], N[(x + N[(x * N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+83], 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 := y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-160}:\\
\;\;\;\;x + x \cdot \left(\frac{z - t}{a - t} \cdot \left(-1 + \frac{y}{x}\right)\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+83}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.6999999999999999e93 or 1.09999999999999999e83 < t Initial program 38.2%
Taylor expanded in t around inf 68.8%
associate--l+68.8%
distribute-lft-out--68.8%
div-sub68.8%
mul-1-neg68.8%
unsub-neg68.8%
div-sub68.8%
associate-/l*80.3%
associate-/l*89.8%
distribute-rgt-out--89.8%
Simplified89.8%
if -2.6999999999999999e93 < t < -2e-160Initial program 81.1%
Taylor expanded in x around inf 77.5%
times-frac88.6%
distribute-rgt-out88.6%
Simplified88.6%
if -2e-160 < t < 1.09999999999999999e83Initial program 91.1%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -9.8e+123)
(not (or (<= z -6.4e+95) (and (not (<= z -1.2e+26)) (<= z 2.2e+52)))))
(* z (/ (- y x) a))
(+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.8e+123) || !((z <= -6.4e+95) || (!(z <= -1.2e+26) && (z <= 2.2e+52)))) {
tmp = z * ((y - x) / a);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-9.8d+123)) .or. (.not. (z <= (-6.4d+95)) .or. (.not. (z <= (-1.2d+26))) .and. (z <= 2.2d+52))) then
tmp = z * ((y - x) / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.8e+123) || !((z <= -6.4e+95) || (!(z <= -1.2e+26) && (z <= 2.2e+52)))) {
tmp = z * ((y - x) / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.8e+123) or not ((z <= -6.4e+95) or (not (z <= -1.2e+26) and (z <= 2.2e+52))): tmp = z * ((y - x) / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.8e+123) || !((z <= -6.4e+95) || (!(z <= -1.2e+26) && (z <= 2.2e+52)))) tmp = Float64(z * Float64(Float64(y - x) / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.8e+123) || ~(((z <= -6.4e+95) || (~((z <= -1.2e+26)) && (z <= 2.2e+52))))) tmp = z * ((y - x) / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.8e+123], N[Not[Or[LessEqual[z, -6.4e+95], And[N[Not[LessEqual[z, -1.2e+26]], $MachinePrecision], LessEqual[z, 2.2e+52]]]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+123} \lor \neg \left(z \leq -6.4 \cdot 10^{+95} \lor \neg \left(z \leq -1.2 \cdot 10^{+26}\right) \land z \leq 2.2 \cdot 10^{+52}\right):\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.79999999999999952e123 or -6.4000000000000001e95 < z < -1.20000000000000002e26 or 2.2e52 < z Initial program 73.1%
Taylor expanded in t around 0 55.3%
Taylor expanded in z around inf 53.4%
div-sub54.3%
Simplified54.3%
if -9.79999999999999952e123 < z < -6.4000000000000001e95 or -1.20000000000000002e26 < z < 2.2e52Initial program 73.3%
Taylor expanded in z around 0 63.9%
mul-1-neg63.9%
unsub-neg63.9%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in y around inf 67.4%
Taylor expanded in t around inf 49.8%
mul-1-neg49.8%
Simplified49.8%
Final simplification51.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a t)))))
(if (<= z -1.96e+124)
t_1
(if (<= z -1.32e+95)
(+ y x)
(if (<= z -8.4e+68)
(* x (/ z (- a)))
(if (<= z 2.5e+55) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (z <= -1.96e+124) {
tmp = t_1;
} else if (z <= -1.32e+95) {
tmp = y + x;
} else if (z <= -8.4e+68) {
tmp = x * (z / -a);
} else if (z <= 2.5e+55) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / (a - t))
if (z <= (-1.96d+124)) then
tmp = t_1
else if (z <= (-1.32d+95)) then
tmp = y + x
else if (z <= (-8.4d+68)) then
tmp = x * (z / -a)
else if (z <= 2.5d+55) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (z <= -1.96e+124) {
tmp = t_1;
} else if (z <= -1.32e+95) {
tmp = y + x;
} else if (z <= -8.4e+68) {
tmp = x * (z / -a);
} else if (z <= 2.5e+55) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (a - t)) tmp = 0 if z <= -1.96e+124: tmp = t_1 elif z <= -1.32e+95: tmp = y + x elif z <= -8.4e+68: tmp = x * (z / -a) elif z <= 2.5e+55: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(a - t))) tmp = 0.0 if (z <= -1.96e+124) tmp = t_1; elseif (z <= -1.32e+95) tmp = Float64(y + x); elseif (z <= -8.4e+68) tmp = Float64(x * Float64(z / Float64(-a))); elseif (z <= 2.5e+55) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (a - t)); tmp = 0.0; if (z <= -1.96e+124) tmp = t_1; elseif (z <= -1.32e+95) tmp = y + x; elseif (z <= -8.4e+68) tmp = x * (z / -a); elseif (z <= 2.5e+55) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.96e+124], t$95$1, If[LessEqual[z, -1.32e+95], N[(y + x), $MachinePrecision], If[LessEqual[z, -8.4e+68], N[(x * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+55], N[(y + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -1.96 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{+95}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \frac{z}{-a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+55}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9599999999999999e124 or 2.50000000000000023e55 < z Initial program 72.8%
Taylor expanded in x around inf 62.9%
times-frac77.6%
distribute-rgt-out84.8%
Simplified84.8%
Taylor expanded in z around inf 52.4%
associate-/l*58.1%
associate-/l*69.4%
sub-neg69.4%
metadata-eval69.4%
+-commutative69.4%
Simplified69.4%
Taylor expanded in x around 0 41.9%
associate-/l*51.6%
Simplified51.6%
if -1.9599999999999999e124 < z < -1.32e95 or -8.40000000000000003e68 < z < 2.50000000000000023e55Initial program 73.1%
Taylor expanded in z around 0 60.3%
mul-1-neg60.3%
unsub-neg60.3%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in y around inf 64.8%
Taylor expanded in t around inf 48.5%
mul-1-neg48.5%
Simplified48.5%
if -1.32e95 < z < -8.40000000000000003e68Initial program 78.5%
Taylor expanded in t around 0 66.4%
Taylor expanded in y around 0 44.7%
mul-1-neg44.7%
unsub-neg44.7%
associate-/l*55.2%
Simplified55.2%
Taylor expanded in z around inf 39.8%
associate-*r/50.3%
neg-mul-150.3%
distribute-rgt-neg-in50.3%
distribute-neg-frac50.3%
Simplified50.3%
Final simplification49.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.6e+181)
y
(if (<= t -2.4e+101)
(* x (/ (- z a) t))
(if (<= t -4.2e+91) y (if (<= t 3.1e+46) (+ x (* y (/ z a))) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.6e+181) {
tmp = y;
} else if (t <= -2.4e+101) {
tmp = x * ((z - a) / t);
} else if (t <= -4.2e+91) {
tmp = y;
} else if (t <= 3.1e+46) {
tmp = x + (y * (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 <= (-8.6d+181)) then
tmp = y
else if (t <= (-2.4d+101)) then
tmp = x * ((z - a) / t)
else if (t <= (-4.2d+91)) then
tmp = y
else if (t <= 3.1d+46) then
tmp = x + (y * (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 <= -8.6e+181) {
tmp = y;
} else if (t <= -2.4e+101) {
tmp = x * ((z - a) / t);
} else if (t <= -4.2e+91) {
tmp = y;
} else if (t <= 3.1e+46) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.6e+181: tmp = y elif t <= -2.4e+101: tmp = x * ((z - a) / t) elif t <= -4.2e+91: tmp = y elif t <= 3.1e+46: tmp = x + (y * (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.6e+181) tmp = y; elseif (t <= -2.4e+101) tmp = Float64(x * Float64(Float64(z - a) / t)); elseif (t <= -4.2e+91) tmp = y; elseif (t <= 3.1e+46) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.6e+181) tmp = y; elseif (t <= -2.4e+101) tmp = x * ((z - a) / t); elseif (t <= -4.2e+91) tmp = y; elseif (t <= 3.1e+46) tmp = x + (y * (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.6e+181], y, If[LessEqual[t, -2.4e+101], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e+91], y, If[LessEqual[t, 3.1e+46], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+181}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{+91}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+46}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -8.59999999999999943e181 or -2.39999999999999988e101 < t < -4.20000000000000015e91 or 3.09999999999999975e46 < t Initial program 43.3%
Taylor expanded in t around inf 60.1%
if -8.59999999999999943e181 < t < -2.39999999999999988e101Initial program 42.1%
Taylor expanded in x around -inf 53.5%
associate-*r*53.5%
neg-mul-153.5%
+-commutative53.5%
Simplified53.5%
Taylor expanded in t around -inf 52.3%
associate-/l*56.3%
Simplified56.3%
if -4.20000000000000015e91 < t < 3.09999999999999975e46Initial program 88.1%
Taylor expanded in t around 0 69.8%
Taylor expanded in y around inf 57.8%
associate-/l*61.7%
Simplified61.7%
Final simplification61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7e+181)
y
(if (<= t -1.38e+101)
(* z (/ (- x y) t))
(if (<= t -7.5e+89) y (if (<= t 2.6e+46) (+ x (* y (/ z a))) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+181) {
tmp = y;
} else if (t <= -1.38e+101) {
tmp = z * ((x - y) / t);
} else if (t <= -7.5e+89) {
tmp = y;
} else if (t <= 2.6e+46) {
tmp = x + (y * (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 <= (-7d+181)) then
tmp = y
else if (t <= (-1.38d+101)) then
tmp = z * ((x - y) / t)
else if (t <= (-7.5d+89)) then
tmp = y
else if (t <= 2.6d+46) then
tmp = x + (y * (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 <= -7e+181) {
tmp = y;
} else if (t <= -1.38e+101) {
tmp = z * ((x - y) / t);
} else if (t <= -7.5e+89) {
tmp = y;
} else if (t <= 2.6e+46) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7e+181: tmp = y elif t <= -1.38e+101: tmp = z * ((x - y) / t) elif t <= -7.5e+89: tmp = y elif t <= 2.6e+46: tmp = x + (y * (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7e+181) tmp = y; elseif (t <= -1.38e+101) tmp = Float64(z * Float64(Float64(x - y) / t)); elseif (t <= -7.5e+89) tmp = y; elseif (t <= 2.6e+46) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7e+181) tmp = y; elseif (t <= -1.38e+101) tmp = z * ((x - y) / t); elseif (t <= -7.5e+89) tmp = y; elseif (t <= 2.6e+46) tmp = x + (y * (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+181], y, If[LessEqual[t, -1.38e+101], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.5e+89], y, If[LessEqual[t, 2.6e+46], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+181}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.38 \cdot 10^{+101}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{+89}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+46}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -7.00000000000000016e181 or -1.38e101 < t < -7.49999999999999947e89 or 2.60000000000000013e46 < t Initial program 43.3%
Taylor expanded in t around inf 60.1%
if -7.00000000000000016e181 < t < -1.38e101Initial program 42.1%
Taylor expanded in t around inf 63.1%
associate--l+63.1%
distribute-lft-out--63.1%
div-sub63.1%
mul-1-neg63.1%
unsub-neg63.1%
div-sub63.1%
associate-/l*79.8%
associate-/l*79.8%
distribute-rgt-out--79.8%
Simplified79.8%
Taylor expanded in z around -inf 47.4%
mul-1-neg47.4%
associate-/l*64.1%
distribute-rgt-neg-in64.1%
distribute-neg-frac264.1%
Simplified64.1%
if -7.49999999999999947e89 < t < 2.60000000000000013e46Initial program 88.1%
Taylor expanded in t around 0 69.8%
Taylor expanded in y around inf 57.8%
associate-/l*61.7%
Simplified61.7%
Final simplification61.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.4e+90) (not (<= t 9.2e+81))) (+ y (* (/ (- y x) t) (- a z))) (+ x (/ (* (- y x) (- z t)) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.4e+90) || !(t <= 9.2e+81)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + (((y - x) * (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 <= (-1.4d+90)) .or. (.not. (t <= 9.2d+81))) then
tmp = y + (((y - x) / t) * (a - z))
else
tmp = x + (((y - x) * (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 <= -1.4e+90) || !(t <= 9.2e+81)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + (((y - x) * (z - t)) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.4e+90) or not (t <= 9.2e+81): tmp = y + (((y - x) / t) * (a - z)) else: tmp = x + (((y - x) * (z - t)) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.4e+90) || !(t <= 9.2e+81)) tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))); else tmp = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.4e+90) || ~((t <= 9.2e+81))) tmp = y + (((y - x) / t) * (a - z)); else tmp = x + (((y - x) * (z - t)) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.4e+90], N[Not[LessEqual[t, 9.2e+81]], $MachinePrecision]], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+90} \lor \neg \left(t \leq 9.2 \cdot 10^{+81}\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\end{array}
\end{array}
if t < -1.4e90 or 9.1999999999999995e81 < t Initial program 39.0%
Taylor expanded in t around inf 69.2%
associate--l+69.2%
distribute-lft-out--69.2%
div-sub69.2%
mul-1-neg69.2%
unsub-neg69.2%
div-sub69.2%
associate-/l*80.6%
associate-/l*90.0%
distribute-rgt-out--90.0%
Simplified90.0%
if -1.4e90 < t < 9.1999999999999995e81Initial program 87.6%
Final simplification88.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.6e+90) (not (<= t 4200000000000.0))) (- y (* (/ x t) (- a z))) (+ x (* (- y x) (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.6e+90) || !(t <= 4200000000000.0)) {
tmp = y - ((x / t) * (a - z));
} else {
tmp = x + ((y - 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 ((t <= (-7.6d+90)) .or. (.not. (t <= 4200000000000.0d0))) then
tmp = y - ((x / t) * (a - z))
else
tmp = x + ((y - 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 ((t <= -7.6e+90) || !(t <= 4200000000000.0)) {
tmp = y - ((x / t) * (a - z));
} else {
tmp = x + ((y - x) * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -7.6e+90) or not (t <= 4200000000000.0): tmp = y - ((x / t) * (a - z)) else: tmp = x + ((y - x) * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.6e+90) || !(t <= 4200000000000.0)) tmp = Float64(y - Float64(Float64(x / t) * Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -7.6e+90) || ~((t <= 4200000000000.0))) tmp = y - ((x / t) * (a - z)); else tmp = x + ((y - x) * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.6e+90], N[Not[LessEqual[t, 4200000000000.0]], $MachinePrecision]], N[(y - N[(N[(x / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{+90} \lor \neg \left(t \leq 4200000000000\right):\\
\;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if t < -7.6000000000000002e90 or 4.2e12 < t Initial program 46.1%
Taylor expanded in t around inf 67.4%
associate--l+67.4%
distribute-lft-out--67.4%
div-sub67.4%
mul-1-neg67.4%
unsub-neg67.4%
div-sub67.4%
associate-/l*76.4%
associate-/l*85.0%
distribute-rgt-out--85.0%
Simplified85.0%
Taylor expanded in y around 0 75.7%
associate-*r/75.7%
neg-mul-175.7%
Simplified75.7%
if -7.6000000000000002e90 < t < 4.2e12Initial program 89.2%
Taylor expanded in a around inf 76.8%
associate-/l*83.4%
Simplified83.4%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.5e+89) (not (<= t 330000000000.0))) (+ y (* (/ (- y x) t) (- a z))) (+ x (* (- y x) (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.5e+89) || !(t <= 330000000000.0)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + ((y - 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 ((t <= (-8.5d+89)) .or. (.not. (t <= 330000000000.0d0))) then
tmp = y + (((y - x) / t) * (a - z))
else
tmp = x + ((y - 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 ((t <= -8.5e+89) || !(t <= 330000000000.0)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + ((y - x) * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.5e+89) or not (t <= 330000000000.0): tmp = y + (((y - x) / t) * (a - z)) else: tmp = x + ((y - x) * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8.5e+89) || !(t <= 330000000000.0)) tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8.5e+89) || ~((t <= 330000000000.0))) tmp = y + (((y - x) / t) * (a - z)); else tmp = x + ((y - x) * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.5e+89], N[Not[LessEqual[t, 330000000000.0]], $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[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+89} \lor \neg \left(t \leq 330000000000\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if t < -8.50000000000000045e89 or 3.3e11 < t Initial program 46.1%
Taylor expanded in t around inf 67.4%
associate--l+67.4%
distribute-lft-out--67.4%
div-sub67.4%
mul-1-neg67.4%
unsub-neg67.4%
div-sub67.4%
associate-/l*76.4%
associate-/l*85.0%
distribute-rgt-out--85.0%
Simplified85.0%
if -8.50000000000000045e89 < t < 3.3e11Initial program 89.2%
Taylor expanded in a around inf 76.8%
associate-/l*83.4%
Simplified83.4%
Final simplification84.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1e+33) (not (<= t 1.18e+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 <= -1e+33) || !(t <= 1.18e+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 <= (-1d+33)) .or. (.not. (t <= 1.18d+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 <= -1e+33) || !(t <= 1.18e+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 <= -1e+33) or not (t <= 1.18e+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 <= -1e+33) || !(t <= 1.18e+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 <= -1e+33) || ~((t <= 1.18e+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, -1e+33], N[Not[LessEqual[t, 1.18e+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 -1 \cdot 10^{+33} \lor \neg \left(t \leq 1.18 \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 < -9.9999999999999995e32 or 1.17999999999999997e44 < t Initial program 50.8%
Taylor expanded in x around 0 59.7%
+-commutative59.7%
+-commutative59.7%
distribute-lft-in59.7%
mul-1-neg59.7%
distribute-rgt-neg-in59.7%
associate-/l*55.5%
mul-1-neg55.5%
*-rgt-identity55.5%
associate-+l+50.6%
Simplified69.5%
Taylor expanded in y around inf 67.1%
div-sub67.1%
Simplified67.1%
if -9.9999999999999995e32 < t < 1.17999999999999997e44Initial program 88.5%
Taylor expanded in t around 0 72.3%
associate-/l*74.9%
Simplified74.9%
Final simplification71.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+89) (not (<= t 300000000000.0))) (- y (* (/ x t) (- a z))) (+ x (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+89) || !(t <= 300000000000.0)) {
tmp = y - ((x / t) * (a - z));
} 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 <= (-6.5d+89)) .or. (.not. (t <= 300000000000.0d0))) then
tmp = y - ((x / t) * (a - z))
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 <= -6.5e+89) || !(t <= 300000000000.0)) {
tmp = y - ((x / t) * (a - z));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e+89) or not (t <= 300000000000.0): tmp = y - ((x / t) * (a - z)) else: tmp = x + (z * ((y - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+89) || !(t <= 300000000000.0)) tmp = Float64(y - Float64(Float64(x / t) * Float64(a - z))); 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 <= -6.5e+89) || ~((t <= 300000000000.0))) tmp = y - ((x / t) * (a - z)); else tmp = x + (z * ((y - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+89], N[Not[LessEqual[t, 300000000000.0]], $MachinePrecision]], N[(y - N[(N[(x / t), $MachinePrecision] * N[(a - z), $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 -6.5 \cdot 10^{+89} \lor \neg \left(t \leq 300000000000\right):\\
\;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if t < -6.4999999999999996e89 or 3e11 < t Initial program 46.1%
Taylor expanded in t around inf 67.4%
associate--l+67.4%
distribute-lft-out--67.4%
div-sub67.4%
mul-1-neg67.4%
unsub-neg67.4%
div-sub67.4%
associate-/l*76.4%
associate-/l*85.0%
distribute-rgt-out--85.0%
Simplified85.0%
Taylor expanded in y around 0 75.7%
associate-*r/75.7%
neg-mul-175.7%
Simplified75.7%
if -6.4999999999999996e89 < t < 3e11Initial program 89.2%
Taylor expanded in t around 0 71.5%
associate-/l*75.2%
Simplified75.2%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.35e+124) (not (<= z 8.5e+60))) (* y (/ z a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e+124) || !(z <= 8.5e+60)) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.35d+124)) .or. (.not. (z <= 8.5d+60))) then
tmp = y * (z / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e+124) || !(z <= 8.5e+60)) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.35e+124) or not (z <= 8.5e+60): tmp = y * (z / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e+124) || !(z <= 8.5e+60)) tmp = Float64(y * Float64(z / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.35e+124) || ~((z <= 8.5e+60))) tmp = y * (z / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e+124], N[Not[LessEqual[z, 8.5e+60]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+124} \lor \neg \left(z \leq 8.5 \cdot 10^{+60}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.34999999999999989e124 or 8.50000000000000064e60 < z Initial program 72.8%
Taylor expanded in t around 0 55.7%
Taylor expanded in y around inf 42.3%
Taylor expanded in x around 0 33.8%
associate-*r/41.5%
Simplified41.5%
if -1.34999999999999989e124 < z < 8.50000000000000064e60Initial program 73.4%
Taylor expanded in z around 0 57.2%
mul-1-neg57.2%
unsub-neg57.2%
associate-/l*62.3%
Simplified62.3%
Taylor expanded in y around inf 61.4%
Taylor expanded in t around inf 46.0%
mul-1-neg46.0%
Simplified46.0%
Final simplification44.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.45e+89) x (if (<= a 4.5e-25) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.45e+89) {
tmp = x;
} else if (a <= 4.5e-25) {
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 <= (-2.45d+89)) then
tmp = x
else if (a <= 4.5d-25) 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 <= -2.45e+89) {
tmp = x;
} else if (a <= 4.5e-25) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.45e+89: tmp = x elif a <= 4.5e-25: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.45e+89) tmp = x; elseif (a <= 4.5e-25) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.45e+89) tmp = x; elseif (a <= 4.5e-25) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.45e+89], x, If[LessEqual[a, 4.5e-25], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.45 \cdot 10^{+89}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-25}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.44999999999999998e89 or 4.5000000000000001e-25 < a Initial program 73.0%
Taylor expanded in a around inf 48.7%
if -2.44999999999999998e89 < a < 4.5000000000000001e-25Initial program 73.3%
Taylor expanded in t around inf 34.0%
Final simplification40.7%
(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 73.2%
Taylor expanded in a around inf 26.8%
Final simplification26.8%
(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 2024078
(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))))