
(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 20 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.3e+142) (not (<= t 1.3e+155))) (- y (* (- y x) (/ (- z a) t))) (+ x (/ (- y x) (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.3e+142) || !(t <= 1.3e+155)) {
tmp = y - ((y - x) * ((z - a) / t));
} else {
tmp = x + ((y - x) / ((a - t) / (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 <= (-3.3d+142)) .or. (.not. (t <= 1.3d+155))) then
tmp = y - ((y - x) * ((z - a) / t))
else
tmp = x + ((y - x) / ((a - t) / (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 <= -3.3e+142) || !(t <= 1.3e+155)) {
tmp = y - ((y - x) * ((z - a) / t));
} else {
tmp = x + ((y - x) / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.3e+142) or not (t <= 1.3e+155): tmp = y - ((y - x) * ((z - a) / t)) else: tmp = x + ((y - x) / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.3e+142) || !(t <= 1.3e+155)) tmp = Float64(y - Float64(Float64(y - x) * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.3e+142) || ~((t <= 1.3e+155))) tmp = y - ((y - x) * ((z - a) / t)); else tmp = x + ((y - x) / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.3e+142], N[Not[LessEqual[t, 1.3e+155]], $MachinePrecision]], N[(y - N[(N[(y - x), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+142} \lor \neg \left(t \leq 1.3 \cdot 10^{+155}\right):\\
\;\;\;\;y - \left(y - x\right) \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if t < -3.3000000000000002e142 or 1.3000000000000001e155 < t Initial program 30.0%
+-commutative30.0%
associate-/l*61.0%
fma-define61.1%
Simplified61.1%
Taylor expanded in t around inf 68.4%
associate--l+68.4%
associate-*r/68.4%
associate-*r/68.4%
mul-1-neg68.4%
div-sub68.5%
mul-1-neg68.5%
distribute-lft-out--68.5%
associate-*r/68.5%
mul-1-neg68.5%
unsub-neg68.5%
distribute-rgt-out--68.5%
Simplified68.5%
Taylor expanded in z around 0 77.6%
+-commutative77.6%
div-sub77.6%
associate-/l*68.4%
mul-1-neg68.4%
sub-neg68.4%
div-sub68.5%
distribute-rgt-out--68.5%
associate-*r/93.4%
Simplified93.4%
if -3.3000000000000002e142 < t < 1.3000000000000001e155Initial program 86.0%
associate-/l*94.8%
*-commutative94.8%
Applied egg-rr94.8%
sub-div94.8%
*-commutative94.8%
sub-div94.8%
clear-num94.8%
un-div-inv94.9%
Applied egg-rr94.9%
Final simplification94.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.16e+129)
y
(if (<= t -8.6e-142)
x
(if (<= t 7.7e-87)
(* y (/ z a))
(if (<= t 2.5e+134) (* z (/ y (- t))) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.16e+129) {
tmp = y;
} else if (t <= -8.6e-142) {
tmp = x;
} else if (t <= 7.7e-87) {
tmp = y * (z / a);
} else if (t <= 2.5e+134) {
tmp = z * (y / -t);
} 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.16d+129)) then
tmp = y
else if (t <= (-8.6d-142)) then
tmp = x
else if (t <= 7.7d-87) then
tmp = y * (z / a)
else if (t <= 2.5d+134) then
tmp = z * (y / -t)
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.16e+129) {
tmp = y;
} else if (t <= -8.6e-142) {
tmp = x;
} else if (t <= 7.7e-87) {
tmp = y * (z / a);
} else if (t <= 2.5e+134) {
tmp = z * (y / -t);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.16e+129: tmp = y elif t <= -8.6e-142: tmp = x elif t <= 7.7e-87: tmp = y * (z / a) elif t <= 2.5e+134: tmp = z * (y / -t) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.16e+129) tmp = y; elseif (t <= -8.6e-142) tmp = x; elseif (t <= 7.7e-87) tmp = Float64(y * Float64(z / a)); elseif (t <= 2.5e+134) tmp = Float64(z * Float64(y / Float64(-t))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.16e+129) tmp = y; elseif (t <= -8.6e-142) tmp = x; elseif (t <= 7.7e-87) tmp = y * (z / a); elseif (t <= 2.5e+134) tmp = z * (y / -t); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.16e+129], y, If[LessEqual[t, -8.6e-142], x, If[LessEqual[t, 7.7e-87], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+134], N[(z * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.16 \cdot 10^{+129}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -8.6 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 7.7 \cdot 10^{-87}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+134}:\\
\;\;\;\;z \cdot \frac{y}{-t}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.16e129 or 2.4999999999999999e134 < t Initial program 32.9%
+-commutative32.9%
associate-/l*64.8%
fma-define64.9%
Simplified64.9%
Taylor expanded in y around inf 70.9%
Taylor expanded in t around inf 56.3%
if -1.16e129 < t < -8.5999999999999995e-142Initial program 80.0%
+-commutative80.0%
associate-/l*94.4%
fma-define94.4%
Simplified94.4%
Taylor expanded in a around inf 28.0%
if -8.5999999999999995e-142 < t < 7.6999999999999998e-87Initial program 92.7%
+-commutative92.7%
associate-/l*94.7%
fma-define94.7%
Simplified94.7%
Taylor expanded in y around inf 41.6%
Taylor expanded in t around 0 37.0%
associate-/l*37.1%
Simplified37.1%
if 7.6999999999999998e-87 < t < 2.4999999999999999e134Initial program 82.8%
+-commutative82.8%
associate-/l*94.8%
fma-define94.8%
Simplified94.8%
Taylor expanded in y around inf 43.9%
Taylor expanded in z around inf 34.5%
associate-/l*37.0%
Applied egg-rr37.0%
associate-*r/34.5%
*-commutative34.5%
associate-*r/36.9%
Simplified36.9%
Taylor expanded in a around 0 34.2%
associate-*r/34.2%
mul-1-neg34.2%
Simplified34.2%
Final simplification40.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.35e+22)
x
(if (<= a -2.2e-190)
(* z (/ y (- t)))
(if (<= a 32000.0)
(* x (/ (- z a) t))
(if (<= a 2.3e+202) (* y (/ z a)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e+22) {
tmp = x;
} else if (a <= -2.2e-190) {
tmp = z * (y / -t);
} else if (a <= 32000.0) {
tmp = x * ((z - a) / t);
} else if (a <= 2.3e+202) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.35d+22)) then
tmp = x
else if (a <= (-2.2d-190)) then
tmp = z * (y / -t)
else if (a <= 32000.0d0) then
tmp = x * ((z - a) / t)
else if (a <= 2.3d+202) then
tmp = y * (z / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e+22) {
tmp = x;
} else if (a <= -2.2e-190) {
tmp = z * (y / -t);
} else if (a <= 32000.0) {
tmp = x * ((z - a) / t);
} else if (a <= 2.3e+202) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.35e+22: tmp = x elif a <= -2.2e-190: tmp = z * (y / -t) elif a <= 32000.0: tmp = x * ((z - a) / t) elif a <= 2.3e+202: tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.35e+22) tmp = x; elseif (a <= -2.2e-190) tmp = Float64(z * Float64(y / Float64(-t))); elseif (a <= 32000.0) tmp = Float64(x * Float64(Float64(z - a) / t)); elseif (a <= 2.3e+202) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.35e+22) tmp = x; elseif (a <= -2.2e-190) tmp = z * (y / -t); elseif (a <= 32000.0) tmp = x * ((z - a) / t); elseif (a <= 2.3e+202) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.35e+22], x, If[LessEqual[a, -2.2e-190], N[(z * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 32000.0], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e+202], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-190}:\\
\;\;\;\;z \cdot \frac{y}{-t}\\
\mathbf{elif}\;a \leq 32000:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+202}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.3500000000000001e22 or 2.29999999999999999e202 < a Initial program 70.3%
+-commutative70.3%
associate-/l*89.7%
fma-define89.8%
Simplified89.8%
Taylor expanded in a around inf 49.3%
if -1.3500000000000001e22 < a < -2.20000000000000004e-190Initial program 68.4%
+-commutative68.4%
associate-/l*82.6%
fma-define82.7%
Simplified82.7%
Taylor expanded in y around inf 69.2%
Taylor expanded in z around inf 30.8%
associate-/l*35.1%
Applied egg-rr35.1%
associate-*r/30.8%
*-commutative30.8%
associate-*r/35.0%
Simplified35.0%
Taylor expanded in a around 0 35.2%
associate-*r/35.2%
mul-1-neg35.2%
Simplified35.2%
if -2.20000000000000004e-190 < a < 32000Initial program 74.2%
+-commutative74.2%
associate-/l*82.6%
fma-define82.6%
Simplified82.6%
Taylor expanded in t around inf 76.8%
associate--l+76.8%
associate-*r/76.8%
associate-*r/76.8%
mul-1-neg76.8%
div-sub76.8%
mul-1-neg76.8%
distribute-lft-out--76.8%
associate-*r/76.8%
mul-1-neg76.8%
unsub-neg76.8%
distribute-rgt-out--76.8%
Simplified76.8%
Taylor expanded in y around 0 39.8%
associate-/l*44.9%
Simplified44.9%
if 32000 < a < 2.29999999999999999e202Initial program 73.8%
+-commutative73.8%
associate-/l*91.6%
fma-define91.6%
Simplified91.6%
Taylor expanded in y around inf 56.5%
Taylor expanded in t around 0 32.2%
associate-/l*34.5%
Simplified34.5%
Final simplification42.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z t)))))
(if (<= t -3.6e+128)
t_1
(if (<= t 2.4e-105)
(+ x (* z (/ (- y x) a)))
(if (<= t 1.25e+137) (* (- y x) (/ (- a z) t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -3.6e+128) {
tmp = t_1;
} else if (t <= 2.4e-105) {
tmp = x + (z * ((y - x) / a));
} else if (t <= 1.25e+137) {
tmp = (y - x) * ((a - z) / 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 * (1.0d0 - (z / t))
if (t <= (-3.6d+128)) then
tmp = t_1
else if (t <= 2.4d-105) then
tmp = x + (z * ((y - x) / a))
else if (t <= 1.25d+137) then
tmp = (y - x) * ((a - z) / 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 * (1.0 - (z / t));
double tmp;
if (t <= -3.6e+128) {
tmp = t_1;
} else if (t <= 2.4e-105) {
tmp = x + (z * ((y - x) / a));
} else if (t <= 1.25e+137) {
tmp = (y - x) * ((a - z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (z / t)) tmp = 0 if t <= -3.6e+128: tmp = t_1 elif t <= 2.4e-105: tmp = x + (z * ((y - x) / a)) elif t <= 1.25e+137: tmp = (y - x) * ((a - z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -3.6e+128) tmp = t_1; elseif (t <= 2.4e-105) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif (t <= 1.25e+137) tmp = Float64(Float64(y - x) * Float64(Float64(a - z) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (z / t)); tmp = 0.0; if (t <= -3.6e+128) tmp = t_1; elseif (t <= 2.4e-105) tmp = x + (z * ((y - x) / a)); elseif (t <= 1.25e+137) tmp = (y - x) * ((a - z) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e+128], t$95$1, If[LessEqual[t, 2.4e-105], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+137], N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-105}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+137}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.60000000000000027e128 or 1.25e137 < t Initial program 32.7%
+-commutative32.7%
associate-/l*63.3%
fma-define63.4%
Simplified63.4%
Taylor expanded in y around inf 72.5%
Taylor expanded in a around 0 66.6%
mul-1-neg66.6%
unsub-neg66.6%
Simplified66.6%
if -3.60000000000000027e128 < t < 2.40000000000000015e-105Initial program 88.4%
Taylor expanded in t around 0 67.1%
associate-/l*70.5%
Simplified70.5%
if 2.40000000000000015e-105 < t < 1.25e137Initial program 79.5%
+-commutative79.5%
associate-/l*93.5%
fma-define93.5%
Simplified93.5%
Taylor expanded in t around inf 58.0%
associate--l+58.0%
associate-*r/58.0%
associate-*r/58.0%
mul-1-neg58.0%
div-sub58.0%
mul-1-neg58.0%
distribute-lft-out--58.0%
associate-*r/58.0%
mul-1-neg58.0%
unsub-neg58.0%
distribute-rgt-out--58.2%
Simplified58.2%
Taylor expanded in t around 0 52.0%
associate-*r/59.9%
*-commutative59.9%
neg-mul-159.9%
distribute-lft-neg-in59.9%
sub-neg59.9%
+-commutative59.9%
remove-double-neg59.9%
sub-neg59.9%
neg-mul-159.9%
neg-mul-159.9%
distribute-lft-out--59.9%
associate-*r/59.9%
mul-1-neg59.9%
remove-double-neg59.9%
Simplified59.9%
Final simplification67.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) a)))))
(if (<= a -1.2e+23)
t_1
(if (<= a -1.3e-192)
(* y (- 1.0 (/ z t)))
(if (<= a 4.8) (* (- y x) (/ (- a z) t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / a));
double tmp;
if (a <= -1.2e+23) {
tmp = t_1;
} else if (a <= -1.3e-192) {
tmp = y * (1.0 - (z / t));
} else if (a <= 4.8) {
tmp = (y - x) * ((a - z) / 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))
if (a <= (-1.2d+23)) then
tmp = t_1
else if (a <= (-1.3d-192)) then
tmp = y * (1.0d0 - (z / t))
else if (a <= 4.8d0) then
tmp = (y - x) * ((a - z) / 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));
double tmp;
if (a <= -1.2e+23) {
tmp = t_1;
} else if (a <= -1.3e-192) {
tmp = y * (1.0 - (z / t));
} else if (a <= 4.8) {
tmp = (y - x) * ((a - z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / a)) tmp = 0 if a <= -1.2e+23: tmp = t_1 elif a <= -1.3e-192: tmp = y * (1.0 - (z / t)) elif a <= 4.8: tmp = (y - x) * ((a - z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / a))) tmp = 0.0 if (a <= -1.2e+23) tmp = t_1; elseif (a <= -1.3e-192) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (a <= 4.8) tmp = Float64(Float64(y - x) * Float64(Float64(a - z) / 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)); tmp = 0.0; if (a <= -1.2e+23) tmp = t_1; elseif (a <= -1.3e-192) tmp = y * (1.0 - (z / t)); elseif (a <= 4.8) tmp = (y - x) * ((a - z) / 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] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.2e+23], t$95$1, If[LessEqual[a, -1.3e-192], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8], N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a}\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{-192}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;a \leq 4.8:\\
\;\;\;\;\left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.2e23 or 4.79999999999999982 < a Initial program 71.3%
Taylor expanded in a around inf 64.4%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in y around inf 62.0%
associate-*r/67.7%
Simplified67.7%
if -1.2e23 < a < -1.3000000000000001e-192Initial program 69.1%
+-commutative69.1%
associate-/l*83.0%
fma-define83.1%
Simplified83.1%
Taylor expanded in y around inf 69.9%
Taylor expanded in a around 0 63.9%
mul-1-neg63.9%
unsub-neg63.9%
Simplified63.9%
if -1.3000000000000001e-192 < a < 4.79999999999999982Initial program 74.4%
+-commutative74.4%
associate-/l*83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in t around inf 77.1%
associate--l+77.1%
associate-*r/77.1%
associate-*r/77.1%
mul-1-neg77.1%
div-sub77.2%
mul-1-neg77.2%
distribute-lft-out--77.2%
associate-*r/77.2%
mul-1-neg77.2%
unsub-neg77.2%
distribute-rgt-out--77.2%
Simplified77.2%
Taylor expanded in t around 0 58.6%
associate-*r/63.9%
*-commutative63.9%
neg-mul-163.9%
distribute-lft-neg-in63.9%
sub-neg63.9%
+-commutative63.9%
remove-double-neg63.9%
sub-neg63.9%
neg-mul-163.9%
neg-mul-163.9%
distribute-lft-out--63.9%
associate-*r/63.9%
mul-1-neg63.9%
remove-double-neg63.9%
Simplified63.9%
Final simplification65.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z a)))))
(if (<= a -1.2e+26)
t_1
(if (<= a -1.76e-193)
(* y (- 1.0 (/ z t)))
(if (<= a 0.85) (* (- y x) (/ (- a z) t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double tmp;
if (a <= -1.2e+26) {
tmp = t_1;
} else if (a <= -1.76e-193) {
tmp = y * (1.0 - (z / t));
} else if (a <= 0.85) {
tmp = (y - x) * ((a - z) / 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 / a))
if (a <= (-1.2d+26)) then
tmp = t_1
else if (a <= (-1.76d-193)) then
tmp = y * (1.0d0 - (z / t))
else if (a <= 0.85d0) then
tmp = (y - x) * ((a - z) / 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 / a));
double tmp;
if (a <= -1.2e+26) {
tmp = t_1;
} else if (a <= -1.76e-193) {
tmp = y * (1.0 - (z / t));
} else if (a <= 0.85) {
tmp = (y - x) * ((a - z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / a)) tmp = 0 if a <= -1.2e+26: tmp = t_1 elif a <= -1.76e-193: tmp = y * (1.0 - (z / t)) elif a <= 0.85: tmp = (y - x) * ((a - z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -1.2e+26) tmp = t_1; elseif (a <= -1.76e-193) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (a <= 0.85) tmp = Float64(Float64(y - x) * Float64(Float64(a - z) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / a)); tmp = 0.0; if (a <= -1.2e+26) tmp = t_1; elseif (a <= -1.76e-193) tmp = y * (1.0 - (z / t)); elseif (a <= 0.85) tmp = (y - x) * ((a - z) / 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[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.2e+26], t$95$1, If[LessEqual[a, -1.76e-193], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.85], N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.76 \cdot 10^{-193}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;a \leq 0.85:\\
\;\;\;\;\left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.20000000000000002e26 or 0.849999999999999978 < a Initial program 71.3%
associate-/l*89.8%
*-commutative89.8%
Applied egg-rr89.8%
Taylor expanded in t around 0 71.1%
Taylor expanded in y around inf 63.3%
if -1.20000000000000002e26 < a < -1.7600000000000001e-193Initial program 69.1%
+-commutative69.1%
associate-/l*83.0%
fma-define83.1%
Simplified83.1%
Taylor expanded in y around inf 69.9%
Taylor expanded in a around 0 63.9%
mul-1-neg63.9%
unsub-neg63.9%
Simplified63.9%
if -1.7600000000000001e-193 < a < 0.849999999999999978Initial program 74.4%
+-commutative74.4%
associate-/l*83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in t around inf 77.1%
associate--l+77.1%
associate-*r/77.1%
associate-*r/77.1%
mul-1-neg77.1%
div-sub77.2%
mul-1-neg77.2%
distribute-lft-out--77.2%
associate-*r/77.2%
mul-1-neg77.2%
unsub-neg77.2%
distribute-rgt-out--77.2%
Simplified77.2%
Taylor expanded in t around 0 58.6%
associate-*r/63.9%
*-commutative63.9%
neg-mul-163.9%
distribute-lft-neg-in63.9%
sub-neg63.9%
+-commutative63.9%
remove-double-neg63.9%
sub-neg63.9%
neg-mul-163.9%
neg-mul-163.9%
distribute-lft-out--63.9%
associate-*r/63.9%
mul-1-neg63.9%
remove-double-neg63.9%
Simplified63.9%
Final simplification63.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.8e+154) (not (<= t 7.5e+150))) (- y (* (- y x) (/ (- z a) t))) (+ x (* (- x y) (/ (- t z) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.8e+154) || !(t <= 7.5e+150)) {
tmp = y - ((y - x) * ((z - a) / t));
} else {
tmp = x + ((x - y) * ((t - z) / (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 <= (-2.8d+154)) .or. (.not. (t <= 7.5d+150))) then
tmp = y - ((y - x) * ((z - a) / t))
else
tmp = x + ((x - y) * ((t - z) / (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 <= -2.8e+154) || !(t <= 7.5e+150)) {
tmp = y - ((y - x) * ((z - a) / t));
} else {
tmp = x + ((x - y) * ((t - z) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.8e+154) or not (t <= 7.5e+150): tmp = y - ((y - x) * ((z - a) / t)) else: tmp = x + ((x - y) * ((t - z) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.8e+154) || !(t <= 7.5e+150)) tmp = Float64(y - Float64(Float64(y - x) * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(Float64(x - y) * Float64(Float64(t - z) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.8e+154) || ~((t <= 7.5e+150))) tmp = y - ((y - x) * ((z - a) / t)); else tmp = x + ((x - y) * ((t - z) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.8e+154], N[Not[LessEqual[t, 7.5e+150]], $MachinePrecision]], N[(y - N[(N[(y - x), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(x - y), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+154} \lor \neg \left(t \leq 7.5 \cdot 10^{+150}\right):\\
\;\;\;\;y - \left(y - x\right) \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(x - y\right) \cdot \frac{t - z}{a - t}\\
\end{array}
\end{array}
if t < -2.7999999999999999e154 or 7.4999999999999998e150 < t Initial program 29.8%
+-commutative29.8%
associate-/l*60.7%
fma-define60.8%
Simplified60.8%
Taylor expanded in t around inf 70.1%
associate--l+70.1%
associate-*r/70.1%
associate-*r/70.1%
mul-1-neg70.1%
div-sub70.1%
mul-1-neg70.1%
distribute-lft-out--70.1%
associate-*r/70.1%
mul-1-neg70.1%
unsub-neg70.1%
distribute-rgt-out--70.2%
Simplified70.2%
Taylor expanded in z around 0 78.1%
+-commutative78.1%
div-sub78.1%
associate-/l*70.1%
mul-1-neg70.1%
sub-neg70.1%
div-sub70.1%
distribute-rgt-out--70.2%
associate-*r/94.7%
Simplified94.7%
if -2.7999999999999999e154 < t < 7.4999999999999998e150Initial program 85.2%
associate-/l*94.4%
*-commutative94.4%
Applied egg-rr94.4%
Final simplification94.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z a)))))
(if (<= a -2.9e+22)
t_1
(if (<= a -7.5e-194)
(* y (- 1.0 (/ z t)))
(if (<= a 0.65) (* (/ z t) (- x y)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double tmp;
if (a <= -2.9e+22) {
tmp = t_1;
} else if (a <= -7.5e-194) {
tmp = y * (1.0 - (z / t));
} else if (a <= 0.65) {
tmp = (z / t) * (x - y);
} 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 / a))
if (a <= (-2.9d+22)) then
tmp = t_1
else if (a <= (-7.5d-194)) then
tmp = y * (1.0d0 - (z / t))
else if (a <= 0.65d0) then
tmp = (z / t) * (x - y)
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 / a));
double tmp;
if (a <= -2.9e+22) {
tmp = t_1;
} else if (a <= -7.5e-194) {
tmp = y * (1.0 - (z / t));
} else if (a <= 0.65) {
tmp = (z / t) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / a)) tmp = 0 if a <= -2.9e+22: tmp = t_1 elif a <= -7.5e-194: tmp = y * (1.0 - (z / t)) elif a <= 0.65: tmp = (z / t) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -2.9e+22) tmp = t_1; elseif (a <= -7.5e-194) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (a <= 0.65) tmp = Float64(Float64(z / t) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / a)); tmp = 0.0; if (a <= -2.9e+22) tmp = t_1; elseif (a <= -7.5e-194) tmp = y * (1.0 - (z / t)); elseif (a <= 0.65) tmp = (z / t) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e+22], t$95$1, If[LessEqual[a, -7.5e-194], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.65], N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-194}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;a \leq 0.65:\\
\;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.9e22 or 0.650000000000000022 < a Initial program 71.3%
associate-/l*89.8%
*-commutative89.8%
Applied egg-rr89.8%
Taylor expanded in t around 0 71.1%
Taylor expanded in y around inf 63.3%
if -2.9e22 < a < -7.4999999999999998e-194Initial program 69.1%
+-commutative69.1%
associate-/l*83.0%
fma-define83.1%
Simplified83.1%
Taylor expanded in y around inf 69.9%
Taylor expanded in a around 0 63.9%
mul-1-neg63.9%
unsub-neg63.9%
Simplified63.9%
if -7.4999999999999998e-194 < a < 0.650000000000000022Initial program 74.4%
+-commutative74.4%
associate-/l*83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in t around inf 77.1%
associate--l+77.1%
associate-*r/77.1%
associate-*r/77.1%
mul-1-neg77.1%
div-sub77.2%
mul-1-neg77.2%
distribute-lft-out--77.2%
associate-*r/77.2%
mul-1-neg77.2%
unsub-neg77.2%
distribute-rgt-out--77.2%
Simplified77.2%
Taylor expanded in t around 0 58.6%
associate-*r/63.9%
*-commutative63.9%
neg-mul-163.9%
distribute-lft-neg-in63.9%
sub-neg63.9%
+-commutative63.9%
remove-double-neg63.9%
sub-neg63.9%
neg-mul-163.9%
neg-mul-163.9%
distribute-lft-out--63.9%
associate-*r/63.9%
mul-1-neg63.9%
remove-double-neg63.9%
Simplified63.9%
Taylor expanded in a around 0 60.1%
associate-*r/60.1%
neg-mul-160.1%
Simplified60.1%
Final simplification62.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.95e+40)
x
(if (<= a 780000.0)
(* y (- 1.0 (/ z t)))
(if (<= a 4.2e+204) (* y (/ z (- a t))) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.95e+40) {
tmp = x;
} else if (a <= 780000.0) {
tmp = y * (1.0 - (z / t));
} else if (a <= 4.2e+204) {
tmp = y * (z / (a - t));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.95d+40)) then
tmp = x
else if (a <= 780000.0d0) then
tmp = y * (1.0d0 - (z / t))
else if (a <= 4.2d+204) then
tmp = y * (z / (a - t))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.95e+40) {
tmp = x;
} else if (a <= 780000.0) {
tmp = y * (1.0 - (z / t));
} else if (a <= 4.2e+204) {
tmp = y * (z / (a - t));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.95e+40: tmp = x elif a <= 780000.0: tmp = y * (1.0 - (z / t)) elif a <= 4.2e+204: tmp = y * (z / (a - t)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.95e+40) tmp = x; elseif (a <= 780000.0) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (a <= 4.2e+204) tmp = Float64(y * Float64(z / Float64(a - t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.95e+40) tmp = x; elseif (a <= 780000.0) tmp = y * (1.0 - (z / t)); elseif (a <= 4.2e+204) tmp = y * (z / (a - t)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.95e+40], x, If[LessEqual[a, 780000.0], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e+204], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 780000:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+204}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.95e40 or 4.2000000000000001e204 < a Initial program 70.0%
+-commutative70.0%
associate-/l*90.5%
fma-define90.5%
Simplified90.5%
Taylor expanded in a around inf 50.5%
if -1.95e40 < a < 7.8e5Initial program 72.4%
+-commutative72.4%
associate-/l*82.4%
fma-define82.4%
Simplified82.4%
Taylor expanded in y around inf 55.8%
Taylor expanded in a around 0 50.6%
mul-1-neg50.6%
unsub-neg50.6%
Simplified50.6%
if 7.8e5 < a < 4.2000000000000001e204Initial program 73.8%
+-commutative73.8%
associate-/l*91.6%
fma-define91.6%
Simplified91.6%
Taylor expanded in y around inf 56.5%
Taylor expanded in z around inf 33.9%
associate-*r/36.2%
Simplified36.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.2e+128)
y
(if (<= t -9e-142)
x
(if (<= t 3.5e-174) (* y (/ z a)) (if (<= t 7.8e+36) x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e+128) {
tmp = y;
} else if (t <= -9e-142) {
tmp = x;
} else if (t <= 3.5e-174) {
tmp = y * (z / a);
} else if (t <= 7.8e+36) {
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 <= (-3.2d+128)) then
tmp = y
else if (t <= (-9d-142)) then
tmp = x
else if (t <= 3.5d-174) then
tmp = y * (z / a)
else if (t <= 7.8d+36) 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 <= -3.2e+128) {
tmp = y;
} else if (t <= -9e-142) {
tmp = x;
} else if (t <= 3.5e-174) {
tmp = y * (z / a);
} else if (t <= 7.8e+36) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.2e+128: tmp = y elif t <= -9e-142: tmp = x elif t <= 3.5e-174: tmp = y * (z / a) elif t <= 7.8e+36: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.2e+128) tmp = y; elseif (t <= -9e-142) tmp = x; elseif (t <= 3.5e-174) tmp = Float64(y * Float64(z / a)); elseif (t <= 7.8e+36) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.2e+128) tmp = y; elseif (t <= -9e-142) tmp = x; elseif (t <= 3.5e-174) tmp = y * (z / a); elseif (t <= 7.8e+36) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.2e+128], y, If[LessEqual[t, -9e-142], x, If[LessEqual[t, 3.5e-174], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+36], x, y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+128}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-174}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+36}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.19999999999999986e128 or 7.80000000000000042e36 < t Initial program 37.6%
+-commutative37.6%
associate-/l*69.1%
fma-define69.2%
Simplified69.2%
Taylor expanded in y around inf 68.5%
Taylor expanded in t around inf 50.3%
if -3.19999999999999986e128 < t < -9.00000000000000037e-142 or 3.49999999999999987e-174 < t < 7.80000000000000042e36Initial program 86.0%
+-commutative86.0%
associate-/l*93.3%
fma-define93.3%
Simplified93.3%
Taylor expanded in a around inf 30.8%
if -9.00000000000000037e-142 < t < 3.49999999999999987e-174Initial program 93.0%
+-commutative93.0%
associate-/l*97.1%
fma-define97.1%
Simplified97.1%
Taylor expanded in y around inf 45.3%
Taylor expanded in t around 0 39.9%
associate-/l*41.3%
Simplified41.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4e+129) (not (<= t 1.76e+44))) (- y (* (- y x) (/ (- z a) t))) (+ x (/ (- y x) (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4e+129) || !(t <= 1.76e+44)) {
tmp = y - ((y - x) * ((z - a) / t));
} else {
tmp = x + ((y - x) / ((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 <= (-4d+129)) .or. (.not. (t <= 1.76d+44))) then
tmp = y - ((y - x) * ((z - a) / t))
else
tmp = x + ((y - x) / ((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 <= -4e+129) || !(t <= 1.76e+44)) {
tmp = y - ((y - x) * ((z - a) / t));
} else {
tmp = x + ((y - x) / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4e+129) or not (t <= 1.76e+44): tmp = y - ((y - x) * ((z - a) / t)) else: tmp = x + ((y - x) / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4e+129) || !(t <= 1.76e+44)) tmp = Float64(y - Float64(Float64(y - x) * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4e+129) || ~((t <= 1.76e+44))) tmp = y - ((y - x) * ((z - a) / t)); else tmp = x + ((y - x) / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4e+129], N[Not[LessEqual[t, 1.76e+44]], $MachinePrecision]], N[(y - N[(N[(y - x), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+129} \lor \neg \left(t \leq 1.76 \cdot 10^{+44}\right):\\
\;\;\;\;y - \left(y - x\right) \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -4e129 or 1.76e44 < t Initial program 37.2%
+-commutative37.2%
associate-/l*68.4%
fma-define68.4%
Simplified68.4%
Taylor expanded in t around inf 65.9%
associate--l+65.9%
associate-*r/65.9%
associate-*r/65.9%
mul-1-neg65.9%
div-sub66.0%
mul-1-neg66.0%
distribute-lft-out--66.0%
associate-*r/66.0%
mul-1-neg66.0%
unsub-neg66.0%
distribute-rgt-out--67.3%
Simplified67.3%
Taylor expanded in z around 0 77.7%
+-commutative77.7%
div-sub77.7%
associate-/l*65.9%
mul-1-neg65.9%
sub-neg65.9%
div-sub66.0%
distribute-rgt-out--67.3%
associate-*r/91.3%
Simplified91.3%
if -4e129 < t < 1.76e44Initial program 88.4%
associate-/l*94.9%
*-commutative94.9%
Applied egg-rr94.9%
sub-div94.9%
*-commutative94.9%
sub-div94.9%
clear-num94.8%
un-div-inv94.9%
Applied egg-rr94.9%
Taylor expanded in z around inf 86.8%
Final simplification88.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.4e+128) (not (<= t 2.5e+106))) (- y (* z (/ (- y x) t))) (+ x (/ (- y x) (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.4e+128) || !(t <= 2.5e+106)) {
tmp = y - (z * ((y - x) / t));
} else {
tmp = x + ((y - x) / ((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.4d+128)) .or. (.not. (t <= 2.5d+106))) then
tmp = y - (z * ((y - x) / t))
else
tmp = x + ((y - x) / ((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.4e+128) || !(t <= 2.5e+106)) {
tmp = y - (z * ((y - x) / t));
} else {
tmp = x + ((y - x) / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.4e+128) or not (t <= 2.5e+106): tmp = y - (z * ((y - x) / t)) else: tmp = x + ((y - x) / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.4e+128) || !(t <= 2.5e+106)) tmp = Float64(y - Float64(z * Float64(Float64(y - x) / t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.4e+128) || ~((t <= 2.5e+106))) tmp = y - (z * ((y - x) / t)); else tmp = x + ((y - x) / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.4e+128], N[Not[LessEqual[t, 2.5e+106]], $MachinePrecision]], N[(y - N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+128} \lor \neg \left(t \leq 2.5 \cdot 10^{+106}\right):\\
\;\;\;\;y - z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -3.3999999999999999e128 or 2.4999999999999999e106 < t Initial program 33.6%
+-commutative33.6%
associate-/l*65.9%
fma-define66.0%
Simplified66.0%
Taylor expanded in t around inf 64.6%
associate--l+64.6%
associate-*r/64.6%
associate-*r/64.6%
mul-1-neg64.6%
div-sub64.6%
mul-1-neg64.6%
distribute-lft-out--64.6%
associate-*r/64.6%
mul-1-neg64.6%
unsub-neg64.6%
distribute-rgt-out--66.0%
Simplified66.0%
Taylor expanded in z around inf 64.6%
associate-/l*79.0%
Simplified79.0%
if -3.3999999999999999e128 < t < 2.4999999999999999e106Initial program 88.2%
associate-/l*95.0%
*-commutative95.0%
Applied egg-rr95.0%
sub-div95.0%
*-commutative95.0%
sub-div95.0%
clear-num95.0%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in z around inf 86.7%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+130) (not (<= t 2.25e+113))) (- y (* z (/ (- y x) t))) (+ x (* z (/ (- y x) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+130) || !(t <= 2.25e+113)) {
tmp = y - (z * ((y - x) / t));
} else {
tmp = x + (z * ((y - x) / (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.8d+130)) .or. (.not. (t <= 2.25d+113))) then
tmp = y - (z * ((y - x) / t))
else
tmp = x + (z * ((y - x) / (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.8e+130) || !(t <= 2.25e+113)) {
tmp = y - (z * ((y - x) / t));
} else {
tmp = x + (z * ((y - x) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+130) or not (t <= 2.25e+113): tmp = y - (z * ((y - x) / t)) else: tmp = x + (z * ((y - x) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+130) || !(t <= 2.25e+113)) tmp = Float64(y - Float64(z * Float64(Float64(y - x) / t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.8e+130) || ~((t <= 2.25e+113))) tmp = y - (z * ((y - x) / t)); else tmp = x + (z * ((y - x) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e+130], N[Not[LessEqual[t, 2.25e+113]], $MachinePrecision]], N[(y - N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+130} \lor \neg \left(t \leq 2.25 \cdot 10^{+113}\right):\\
\;\;\;\;y - z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if t < -4.80000000000000048e130 or 2.25e113 < t Initial program 33.6%
+-commutative33.6%
associate-/l*65.9%
fma-define66.0%
Simplified66.0%
Taylor expanded in t around inf 64.6%
associate--l+64.6%
associate-*r/64.6%
associate-*r/64.6%
mul-1-neg64.6%
div-sub64.6%
mul-1-neg64.6%
distribute-lft-out--64.6%
associate-*r/64.6%
mul-1-neg64.6%
unsub-neg64.6%
distribute-rgt-out--66.0%
Simplified66.0%
Taylor expanded in z around inf 64.6%
associate-/l*79.0%
Simplified79.0%
if -4.80000000000000048e130 < t < 2.25e113Initial program 88.2%
Taylor expanded in z around inf 81.4%
associate-/l*85.2%
Simplified85.2%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.4e+129) (not (<= t 6.4e+44))) (* y (- 1.0 (/ z t))) (+ x (/ (- y x) (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.4e+129) || !(t <= 6.4e+44)) {
tmp = y * (1.0 - (z / 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 <= (-4.4d+129)) .or. (.not. (t <= 6.4d+44))) then
tmp = y * (1.0d0 - (z / 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 <= -4.4e+129) || !(t <= 6.4e+44)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + ((y - x) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.4e+129) or not (t <= 6.4e+44): tmp = y * (1.0 - (z / t)) else: tmp = x + ((y - x) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.4e+129) || !(t <= 6.4e+44)) tmp = Float64(y * Float64(1.0 - Float64(z / 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 <= -4.4e+129) || ~((t <= 6.4e+44))) tmp = y * (1.0 - (z / t)); else tmp = x + ((y - x) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.4e+129], N[Not[LessEqual[t, 6.4e+44]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / 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 -4.4 \cdot 10^{+129} \lor \neg \left(t \leq 6.4 \cdot 10^{+44}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -4.3999999999999999e129 or 6.40000000000000009e44 < t Initial program 37.2%
+-commutative37.2%
associate-/l*68.4%
fma-define68.4%
Simplified68.4%
Taylor expanded in y around inf 69.0%
Taylor expanded in a around 0 64.0%
mul-1-neg64.0%
unsub-neg64.0%
Simplified64.0%
if -4.3999999999999999e129 < t < 6.40000000000000009e44Initial program 88.4%
associate-/l*94.9%
*-commutative94.9%
Applied egg-rr94.9%
sub-div94.9%
*-commutative94.9%
sub-div94.9%
clear-num94.8%
un-div-inv94.9%
Applied egg-rr94.9%
Taylor expanded in t around 0 67.4%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.3e+129) (not (<= t 2.5e+44))) (* y (- 1.0 (/ z t))) (+ x (* (- y x) (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.3e+129) || !(t <= 2.5e+44)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + ((y - x) * (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 <= (-5.3d+129)) .or. (.not. (t <= 2.5d+44))) then
tmp = y * (1.0d0 - (z / t))
else
tmp = x + ((y - x) * (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 <= -5.3e+129) || !(t <= 2.5e+44)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + ((y - x) * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.3e+129) or not (t <= 2.5e+44): tmp = y * (1.0 - (z / t)) else: tmp = x + ((y - x) * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.3e+129) || !(t <= 2.5e+44)) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.3e+129) || ~((t <= 2.5e+44))) tmp = y * (1.0 - (z / t)); else tmp = x + ((y - x) * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.3e+129], N[Not[LessEqual[t, 2.5e+44]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.3 \cdot 10^{+129} \lor \neg \left(t \leq 2.5 \cdot 10^{+44}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -5.2999999999999999e129 or 2.4999999999999998e44 < t Initial program 37.2%
+-commutative37.2%
associate-/l*68.4%
fma-define68.4%
Simplified68.4%
Taylor expanded in y around inf 69.0%
Taylor expanded in a around 0 64.0%
mul-1-neg64.0%
unsub-neg64.0%
Simplified64.0%
if -5.2999999999999999e129 < t < 2.4999999999999998e44Initial program 88.4%
associate-/l*94.9%
*-commutative94.9%
Applied egg-rr94.9%
Taylor expanded in t around 0 67.4%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.1e+22) (+ x (* z (/ (- y x) a))) (if (<= a 225.0) (- y (* z (/ (- y x) t))) (+ x (/ (- y x) (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.1e+22) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 225.0) {
tmp = y - (z * ((y - x) / 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 (a <= (-3.1d+22)) then
tmp = x + (z * ((y - x) / a))
else if (a <= 225.0d0) then
tmp = y - (z * ((y - x) / 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 (a <= -3.1e+22) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 225.0) {
tmp = y - (z * ((y - x) / t));
} else {
tmp = x + ((y - x) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.1e+22: tmp = x + (z * ((y - x) / a)) elif a <= 225.0: tmp = y - (z * ((y - x) / t)) else: tmp = x + ((y - x) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.1e+22) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif (a <= 225.0) tmp = Float64(y - Float64(z * Float64(Float64(y - x) / 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 (a <= -3.1e+22) tmp = x + (z * ((y - x) / a)); elseif (a <= 225.0) tmp = y - (z * ((y - x) / t)); else tmp = x + ((y - x) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.1e+22], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 225.0], N[(y - N[(z * N[(N[(y - x), $MachinePrecision] / 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}\;a \leq -3.1 \cdot 10^{+22}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;a \leq 225:\\
\;\;\;\;y - z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\end{array}
\end{array}
if a < -3.1000000000000002e22Initial program 71.7%
Taylor expanded in t around 0 67.7%
associate-/l*75.0%
Simplified75.0%
if -3.1000000000000002e22 < a < 225Initial program 72.6%
+-commutative72.6%
associate-/l*83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in t around inf 74.5%
associate--l+74.5%
associate-*r/74.5%
associate-*r/74.5%
mul-1-neg74.5%
div-sub76.0%
mul-1-neg76.0%
distribute-lft-out--76.0%
associate-*r/76.0%
mul-1-neg76.0%
unsub-neg76.0%
distribute-rgt-out--76.0%
Simplified76.0%
Taylor expanded in z around inf 72.5%
associate-/l*77.2%
Simplified77.2%
if 225 < a Initial program 71.0%
associate-/l*90.7%
*-commutative90.7%
Applied egg-rr90.7%
sub-div90.7%
*-commutative90.7%
sub-div90.7%
clear-num90.6%
un-div-inv90.7%
Applied egg-rr90.7%
Taylor expanded in t around 0 68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.6e+128) (not (<= t 1.9e+38))) (* y (- 1.0 (/ z t))) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.6e+128) || !(t <= 1.9e+38)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-4.6d+128)) .or. (.not. (t <= 1.9d+38))) then
tmp = y * (1.0d0 - (z / t))
else
tmp = x + (y * (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+128) || !(t <= 1.9e+38)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.6e+128) or not (t <= 1.9e+38): tmp = y * (1.0 - (z / t)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.6e+128) || !(t <= 1.9e+38)) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.6e+128) || ~((t <= 1.9e+38))) tmp = y * (1.0 - (z / t)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.6e+128], N[Not[LessEqual[t, 1.9e+38]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+128} \lor \neg \left(t \leq 1.9 \cdot 10^{+38}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -4.59999999999999996e128 or 1.8999999999999999e38 < t Initial program 37.6%
+-commutative37.6%
associate-/l*69.1%
fma-define69.2%
Simplified69.2%
Taylor expanded in y around inf 68.5%
Taylor expanded in a around 0 63.7%
mul-1-neg63.7%
unsub-neg63.7%
Simplified63.7%
if -4.59999999999999996e128 < t < 1.8999999999999999e38Initial program 88.8%
associate-/l*94.8%
*-commutative94.8%
Applied egg-rr94.8%
Taylor expanded in t around 0 67.6%
Taylor expanded in y around inf 56.5%
Final simplification58.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -4e+47) x (if (<= a 1.9e+132) (* y (- 1.0 (/ z t))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e+47) {
tmp = x;
} else if (a <= 1.9e+132) {
tmp = y * (1.0 - (z / t));
} 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 <= (-4d+47)) then
tmp = x
else if (a <= 1.9d+132) then
tmp = y * (1.0d0 - (z / t))
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 <= -4e+47) {
tmp = x;
} else if (a <= 1.9e+132) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4e+47: tmp = x elif a <= 1.9e+132: tmp = y * (1.0 - (z / t)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4e+47) tmp = x; elseif (a <= 1.9e+132) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4e+47) tmp = x; elseif (a <= 1.9e+132) tmp = y * (1.0 - (z / t)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4e+47], x, If[LessEqual[a, 1.9e+132], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+132}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.0000000000000002e47 or 1.90000000000000003e132 < a Initial program 70.7%
+-commutative70.7%
associate-/l*90.2%
fma-define90.3%
Simplified90.3%
Taylor expanded in a around inf 45.3%
if -4.0000000000000002e47 < a < 1.90000000000000003e132Initial program 72.7%
+-commutative72.7%
associate-/l*84.3%
fma-define84.3%
Simplified84.3%
Taylor expanded in y around inf 55.9%
Taylor expanded in a around 0 46.9%
mul-1-neg46.9%
unsub-neg46.9%
Simplified46.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.2e+129) y (if (<= t 3.2e+35) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+129) {
tmp = y;
} else if (t <= 3.2e+35) {
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 <= (-4.2d+129)) then
tmp = y
else if (t <= 3.2d+35) 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 <= -4.2e+129) {
tmp = y;
} else if (t <= 3.2e+35) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.2e+129: tmp = y elif t <= 3.2e+35: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.2e+129) tmp = y; elseif (t <= 3.2e+35) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.2e+129) tmp = y; elseif (t <= 3.2e+35) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.2e+129], y, If[LessEqual[t, 3.2e+35], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+129}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+35}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.19999999999999993e129 or 3.19999999999999983e35 < t Initial program 37.6%
+-commutative37.6%
associate-/l*69.1%
fma-define69.2%
Simplified69.2%
Taylor expanded in y around inf 68.5%
Taylor expanded in t around inf 50.3%
if -4.19999999999999993e129 < t < 3.19999999999999983e35Initial program 88.8%
+-commutative88.8%
associate-/l*94.8%
fma-define94.8%
Simplified94.8%
Taylor expanded in a around inf 30.1%
(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 72.0%
+-commutative72.0%
associate-/l*86.4%
fma-define86.4%
Simplified86.4%
Taylor expanded in a around inf 22.2%
(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 2024185
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))