
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (or (<= x -7.2e-118) (not (<= x 1.5e-107)))
(*
x
(-
(- 1.0 (/ z (- z a)))
(+ (/ y (- a z)) (* (/ t x) (/ (- y z) (- z a))))))
(+ x (/ (- t x) (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.2e-118) || !(x <= 1.5e-107)) {
tmp = x * ((1.0 - (z / (z - a))) - ((y / (a - z)) + ((t / x) * ((y - z) / (z - a)))));
} else {
tmp = x + ((t - x) / ((a - z) / (y - 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 ((x <= (-7.2d-118)) .or. (.not. (x <= 1.5d-107))) then
tmp = x * ((1.0d0 - (z / (z - a))) - ((y / (a - z)) + ((t / x) * ((y - z) / (z - a)))))
else
tmp = x + ((t - x) / ((a - z) / (y - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.2e-118) || !(x <= 1.5e-107)) {
tmp = x * ((1.0 - (z / (z - a))) - ((y / (a - z)) + ((t / x) * ((y - z) / (z - a)))));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.2e-118) or not (x <= 1.5e-107): tmp = x * ((1.0 - (z / (z - a))) - ((y / (a - z)) + ((t / x) * ((y - z) / (z - a))))) else: tmp = x + ((t - x) / ((a - z) / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7.2e-118) || !(x <= 1.5e-107)) tmp = Float64(x * Float64(Float64(1.0 - Float64(z / Float64(z - a))) - Float64(Float64(y / Float64(a - z)) + Float64(Float64(t / x) * Float64(Float64(y - z) / Float64(z - a)))))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7.2e-118) || ~((x <= 1.5e-107))) tmp = x * ((1.0 - (z / (z - a))) - ((y / (a - z)) + ((t / x) * ((y - z) / (z - a))))); else tmp = x + ((t - x) / ((a - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.2e-118], N[Not[LessEqual[x, 1.5e-107]], $MachinePrecision]], N[(x * N[(N[(1.0 - N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-118} \lor \neg \left(x \leq 1.5 \cdot 10^{-107}\right):\\
\;\;\;\;x \cdot \left(\left(1 - \frac{z}{z - a}\right) - \left(\frac{y}{a - z} + \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if x < -7.2000000000000004e-118 or 1.4999999999999999e-107 < x Initial program 59.2%
+-commutative59.2%
*-commutative59.2%
associate-/l*81.3%
fma-define81.3%
Simplified81.3%
Taylor expanded in x around -inf 76.5%
mul-1-neg76.5%
*-commutative76.5%
distribute-rgt-neg-in76.5%
+-commutative76.5%
mul-1-neg76.5%
unsub-neg76.5%
times-frac94.7%
+-commutative94.7%
Simplified94.7%
if -7.2000000000000004e-118 < x < 1.4999999999999999e-107Initial program 86.6%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around 0 86.1%
mul-1-neg86.1%
associate-/l*88.8%
distribute-lft-neg-out88.8%
+-commutative88.8%
div-sub88.8%
distribute-rgt-out88.8%
sub-neg88.8%
associate-/r/95.6%
Simplified95.6%
Final simplification95.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -5e-267)
t_1
(if (<= t_2 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 2e+248) t_2 t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-267) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+248) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
t_2 = x + (((y - z) * (t - x)) / (a - z))
if (t_2 <= (-5d-267)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = t + (((t - x) * (a - y)) / z)
else if (t_2 <= 2d+248) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-267) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+248) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -5e-267: tmp = t_1 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 2e+248: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -5e-267) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 2e+248) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -5e-267) tmp = t_1; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 2e+248) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-267], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+248], t$95$2, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-267}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+248}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.9999999999999999e-267 or 2.00000000000000009e248 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 59.9%
associate-/l*88.6%
Simplified88.6%
if -4.9999999999999999e-267 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
+-commutative3.9%
*-commutative3.9%
associate-/l*3.9%
fma-define3.9%
Simplified3.9%
Taylor expanded in z around inf 99.7%
associate--l+99.7%
associate-*r/99.7%
associate-*r/99.7%
mul-1-neg99.7%
div-sub99.7%
mul-1-neg99.7%
distribute-lft-out--99.7%
associate-*r/99.7%
mul-1-neg99.7%
unsub-neg99.7%
distribute-rgt-out--99.7%
Simplified99.7%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000009e248Initial program 98.3%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -5e-267) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -5e-267) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-5d-267)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -5e-267) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -5e-267) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -5e-267) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if ((t_1 <= -5e-267) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-267], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-267} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.9999999999999999e-267 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.2%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around 0 77.7%
mul-1-neg77.7%
associate-/l*86.0%
distribute-lft-neg-out86.0%
+-commutative86.0%
div-sub86.0%
distribute-rgt-out88.8%
sub-neg88.8%
associate-/r/91.5%
Simplified91.5%
if -4.9999999999999999e-267 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
+-commutative3.9%
*-commutative3.9%
associate-/l*3.9%
fma-define3.9%
Simplified3.9%
Taylor expanded in z around inf 99.7%
associate--l+99.7%
associate-*r/99.7%
associate-*r/99.7%
mul-1-neg99.7%
div-sub99.7%
mul-1-neg99.7%
distribute-lft-out--99.7%
associate-*r/99.7%
mul-1-neg99.7%
unsub-neg99.7%
distribute-rgt-out--99.7%
Simplified99.7%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.2e-104)
(+ x (* (- y z) (/ (- t x) (- a z))))
(if (<= a 1.25e-148)
(+ t (+ (* y (/ (- x t) z)) (/ (* a (- t x)) z)))
(+ x (/ (- t x) (/ (- a z) (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e-104) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if (a <= 1.25e-148) {
tmp = t + ((y * ((x - t) / z)) + ((a * (t - x)) / z));
} else {
tmp = x + ((t - x) / ((a - z) / (y - 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 <= (-4.2d-104)) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else if (a <= 1.25d-148) then
tmp = t + ((y * ((x - t) / z)) + ((a * (t - x)) / z))
else
tmp = x + ((t - x) / ((a - z) / (y - 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 <= -4.2e-104) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if (a <= 1.25e-148) {
tmp = t + ((y * ((x - t) / z)) + ((a * (t - x)) / z));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.2e-104: tmp = x + ((y - z) * ((t - x) / (a - z))) elif a <= 1.25e-148: tmp = t + ((y * ((x - t) / z)) + ((a * (t - x)) / z)) else: tmp = x + ((t - x) / ((a - z) / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.2e-104) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); elseif (a <= 1.25e-148) tmp = Float64(t + Float64(Float64(y * Float64(Float64(x - t) / z)) + Float64(Float64(a * Float64(t - x)) / z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.2e-104) tmp = x + ((y - z) * ((t - x) / (a - z))); elseif (a <= 1.25e-148) tmp = t + ((y * ((x - t) / z)) + ((a * (t - x)) / z)); else tmp = x + ((t - x) / ((a - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e-104], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-148], N[(t + N[(N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{-104}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-148}:\\
\;\;\;\;t + \left(y \cdot \frac{x - t}{z} + \frac{a \cdot \left(t - x\right)}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if a < -4.19999999999999997e-104Initial program 75.6%
associate-/l*89.3%
Simplified89.3%
if -4.19999999999999997e-104 < a < 1.25e-148Initial program 56.8%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in y around 0 59.4%
mul-1-neg59.4%
associate-/l*59.5%
distribute-lft-neg-out59.5%
+-commutative59.5%
div-sub59.5%
distribute-rgt-out68.0%
sub-neg68.0%
associate-/r/70.3%
Simplified70.3%
Taylor expanded in z around inf 77.8%
associate--l+77.8%
associate-*r/77.8%
neg-mul-177.8%
distribute-rgt-neg-in77.8%
associate-/l*94.1%
associate-*r/94.1%
associate-*r*94.1%
mul-1-neg94.1%
Simplified94.1%
if 1.25e-148 < a Initial program 68.9%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in y around 0 79.1%
mul-1-neg79.1%
associate-/l*88.4%
distribute-lft-neg-out88.4%
+-commutative88.4%
div-sub88.4%
distribute-rgt-out88.4%
sub-neg88.4%
associate-/r/92.9%
Simplified92.9%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) (- z a)))))
(if (<= z -6e+146)
t_1
(if (<= z -2.7e-97)
(* x (+ 1.0 (/ (- y z) (- z a))))
(if (<= z 5e-117) (+ x (/ (- t x) (/ a y))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / (z - a));
double tmp;
if (z <= -6e+146) {
tmp = t_1;
} else if (z <= -2.7e-97) {
tmp = x * (1.0 + ((y - z) / (z - a)));
} else if (z <= 5e-117) {
tmp = x + ((t - x) / (a / 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 = t * ((z - y) / (z - a))
if (z <= (-6d+146)) then
tmp = t_1
else if (z <= (-2.7d-97)) then
tmp = x * (1.0d0 + ((y - z) / (z - a)))
else if (z <= 5d-117) then
tmp = x + ((t - x) / (a / 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 = t * ((z - y) / (z - a));
double tmp;
if (z <= -6e+146) {
tmp = t_1;
} else if (z <= -2.7e-97) {
tmp = x * (1.0 + ((y - z) / (z - a)));
} else if (z <= 5e-117) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / (z - a)) tmp = 0 if z <= -6e+146: tmp = t_1 elif z <= -2.7e-97: tmp = x * (1.0 + ((y - z) / (z - a))) elif z <= 5e-117: tmp = x + ((t - x) / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / Float64(z - a))) tmp = 0.0 if (z <= -6e+146) tmp = t_1; elseif (z <= -2.7e-97) tmp = Float64(x * Float64(1.0 + Float64(Float64(y - z) / Float64(z - a)))); elseif (z <= 5e-117) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / (z - a)); tmp = 0.0; if (z <= -6e+146) tmp = t_1; elseif (z <= -2.7e-97) tmp = x * (1.0 + ((y - z) / (z - a))); elseif (z <= 5e-117) tmp = x + ((t - x) / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+146], t$95$1, If[LessEqual[z, -2.7e-97], N[(x * N[(1.0 + N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-117], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z - a}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-97}:\\
\;\;\;\;x \cdot \left(1 + \frac{y - z}{z - a}\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-117}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.00000000000000005e146 or 5e-117 < z Initial program 53.3%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in y around 0 57.2%
mul-1-neg57.2%
associate-/l*73.1%
distribute-lft-neg-out73.1%
+-commutative73.1%
div-sub73.1%
distribute-rgt-out73.1%
sub-neg73.1%
associate-/r/77.0%
Simplified77.0%
+-commutative77.0%
add-cube-cbrt76.1%
fma-define76.4%
pow276.4%
Applied egg-rr76.4%
Taylor expanded in t around inf 64.3%
div-sub64.3%
Simplified64.3%
if -6.00000000000000005e146 < z < -2.69999999999999985e-97Initial program 68.0%
+-commutative68.0%
*-commutative68.0%
associate-/l*88.8%
fma-define88.8%
Simplified88.8%
Taylor expanded in t around 0 49.8%
*-rgt-identity49.8%
mul-1-neg49.8%
associate-/l*64.4%
distribute-rgt-neg-in64.4%
mul-1-neg64.4%
distribute-lft-in64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
if -2.69999999999999985e-97 < z < 5e-117Initial program 92.0%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 94.5%
mul-1-neg94.5%
associate-/l*86.3%
distribute-lft-neg-out86.3%
+-commutative86.3%
div-sub86.3%
distribute-rgt-out95.9%
sub-neg95.9%
associate-/r/97.3%
Simplified97.3%
Taylor expanded in z around 0 90.6%
Final simplification71.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e-163) (not (<= a 6.8e-36))) (+ x (* (- y z) (/ (- t x) (- a z)))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e-163) || !(a <= 6.8e-36)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / 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 <= (-5.2d-163)) .or. (.not. (a <= 6.8d-36))) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else
tmp = t + (((t - x) * (a - y)) / 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 <= -5.2e-163) || !(a <= 6.8e-36)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.2e-163) or not (a <= 6.8e-36): tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.2e-163) || !(a <= 6.8e-36)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.2e-163) || ~((a <= 6.8e-36))) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.2e-163], N[Not[LessEqual[a, 6.8e-36]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-163} \lor \neg \left(a \leq 6.8 \cdot 10^{-36}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -5.20000000000000003e-163 or 6.8000000000000005e-36 < a Initial program 69.9%
associate-/l*88.6%
Simplified88.6%
if -5.20000000000000003e-163 < a < 6.8000000000000005e-36Initial program 62.3%
+-commutative62.3%
*-commutative62.3%
associate-/l*72.7%
fma-define72.7%
Simplified72.7%
Taylor expanded in z around inf 82.0%
associate--l+82.0%
associate-*r/82.0%
associate-*r/82.0%
mul-1-neg82.0%
div-sub82.0%
mul-1-neg82.0%
distribute-lft-out--82.0%
associate-*r/82.0%
mul-1-neg82.0%
unsub-neg82.0%
distribute-rgt-out--82.0%
Simplified82.0%
Final simplification86.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+79)
t
(if (<= z 510000.0)
(+ x (/ t (/ a y)))
(if (<= z 8.5e+112) (* y (/ (- x t) z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+79) {
tmp = t;
} else if (z <= 510000.0) {
tmp = x + (t / (a / y));
} else if (z <= 8.5e+112) {
tmp = y * ((x - t) / z);
} else {
tmp = 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 (z <= (-2.3d+79)) then
tmp = t
else if (z <= 510000.0d0) then
tmp = x + (t / (a / y))
else if (z <= 8.5d+112) then
tmp = y * ((x - t) / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+79) {
tmp = t;
} else if (z <= 510000.0) {
tmp = x + (t / (a / y));
} else if (z <= 8.5e+112) {
tmp = y * ((x - t) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+79: tmp = t elif z <= 510000.0: tmp = x + (t / (a / y)) elif z <= 8.5e+112: tmp = y * ((x - t) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+79) tmp = t; elseif (z <= 510000.0) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 8.5e+112) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+79) tmp = t; elseif (z <= 510000.0) tmp = x + (t / (a / y)); elseif (z <= 8.5e+112) tmp = y * ((x - t) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+79], t, If[LessEqual[z, 510000.0], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+112], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+79}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 510000:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+112}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.3e79 or 8.50000000000000047e112 < z Initial program 44.5%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in y around 0 48.8%
mul-1-neg48.8%
associate-/l*72.2%
distribute-lft-neg-out72.2%
+-commutative72.2%
div-sub72.2%
distribute-rgt-out72.2%
sub-neg72.2%
associate-/r/77.4%
Simplified77.4%
Taylor expanded in z around inf 50.1%
if -2.3e79 < z < 5.1e5Initial program 83.1%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 89.2%
mul-1-neg89.2%
associate-/l*86.5%
distribute-lft-neg-out86.5%
+-commutative86.5%
div-sub86.5%
distribute-rgt-out91.5%
sub-neg91.5%
associate-/r/92.7%
Simplified92.7%
Taylor expanded in z around 0 72.8%
Taylor expanded in t around inf 60.0%
if 5.1e5 < z < 8.50000000000000047e112Initial program 68.4%
+-commutative68.4%
*-commutative68.4%
associate-/l*78.1%
fma-define78.1%
Simplified78.1%
Taylor expanded in y around inf 59.1%
Taylor expanded in a around 0 46.6%
distribute-lft-out--46.6%
div-sub46.6%
associate-*r/46.6%
neg-mul-146.6%
Simplified46.6%
Final simplification55.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= a -1.36e-104)
t_1
(if (<= a 3.1e+31) t (if (<= a 2.9e+79) (* y (/ t (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (a <= -1.36e-104) {
tmp = t_1;
} else if (a <= 3.1e+31) {
tmp = t;
} else if (a <= 2.9e+79) {
tmp = y * (t / (a - z));
} 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 * (1.0d0 - (y / a))
if (a <= (-1.36d-104)) then
tmp = t_1
else if (a <= 3.1d+31) then
tmp = t
else if (a <= 2.9d+79) then
tmp = y * (t / (a - z))
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 * (1.0 - (y / a));
double tmp;
if (a <= -1.36e-104) {
tmp = t_1;
} else if (a <= 3.1e+31) {
tmp = t;
} else if (a <= 2.9e+79) {
tmp = y * (t / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if a <= -1.36e-104: tmp = t_1 elif a <= 3.1e+31: tmp = t elif a <= 2.9e+79: tmp = y * (t / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -1.36e-104) tmp = t_1; elseif (a <= 3.1e+31) tmp = t; elseif (a <= 2.9e+79) tmp = Float64(y * Float64(t / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -1.36e-104) tmp = t_1; elseif (a <= 3.1e+31) tmp = t; elseif (a <= 2.9e+79) tmp = y * (t / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.36e-104], t$95$1, If[LessEqual[a, 3.1e+31], t, If[LessEqual[a, 2.9e+79], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -1.36 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+31}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+79}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.35999999999999997e-104 or 2.89999999999999992e79 < a Initial program 70.3%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in y around 0 78.7%
mul-1-neg78.7%
associate-/l*88.9%
distribute-lft-neg-out88.9%
+-commutative88.9%
div-sub88.9%
distribute-rgt-out89.6%
sub-neg89.6%
associate-/r/91.5%
Simplified91.5%
Taylor expanded in z around 0 67.3%
Taylor expanded in x around inf 54.1%
mul-1-neg54.1%
unsub-neg54.1%
Simplified54.1%
if -1.35999999999999997e-104 < a < 3.1000000000000002e31Initial program 62.3%
associate-/l*71.1%
Simplified71.1%
Taylor expanded in y around 0 63.1%
mul-1-neg63.1%
associate-/l*65.0%
distribute-lft-neg-out65.0%
+-commutative65.0%
div-sub65.0%
distribute-rgt-out71.1%
sub-neg71.1%
associate-/r/74.9%
Simplified74.9%
Taylor expanded in z around inf 46.2%
if 3.1000000000000002e31 < a < 2.89999999999999992e79Initial program 77.8%
+-commutative77.8%
*-commutative77.8%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in y around inf 75.9%
Taylor expanded in t around inf 74.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.7e+163) (not (<= y 3.4e-20))) (- x (* y (/ (- t x) (- z a)))) (+ x (* t (/ (- z y) (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.7e+163) || !(y <= 3.4e-20)) {
tmp = x - (y * ((t - x) / (z - a)));
} else {
tmp = x + (t * ((z - 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 ((y <= (-2.7d+163)) .or. (.not. (y <= 3.4d-20))) then
tmp = x - (y * ((t - x) / (z - a)))
else
tmp = x + (t * ((z - 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 ((y <= -2.7e+163) || !(y <= 3.4e-20)) {
tmp = x - (y * ((t - x) / (z - a)));
} else {
tmp = x + (t * ((z - y) / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.7e+163) or not (y <= 3.4e-20): tmp = x - (y * ((t - x) / (z - a))) else: tmp = x + (t * ((z - y) / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.7e+163) || !(y <= 3.4e-20)) tmp = Float64(x - Float64(y * Float64(Float64(t - x) / Float64(z - a)))); else tmp = Float64(x + Float64(t * Float64(Float64(z - y) / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.7e+163) || ~((y <= 3.4e-20))) tmp = x - (y * ((t - x) / (z - a))); else tmp = x + (t * ((z - y) / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.7e+163], N[Not[LessEqual[y, 3.4e-20]], $MachinePrecision]], N[(x - N[(y * N[(N[(t - x), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+163} \lor \neg \left(y \leq 3.4 \cdot 10^{-20}\right):\\
\;\;\;\;x - y \cdot \frac{t - x}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{z - y}{z - a}\\
\end{array}
\end{array}
if y < -2.69999999999999999e163 or 3.3999999999999997e-20 < y Initial program 61.6%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around inf 59.6%
associate-*r/80.2%
Simplified80.2%
if -2.69999999999999999e163 < y < 3.3999999999999997e-20Initial program 72.0%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in t around inf 68.3%
associate-/l*78.9%
Simplified78.9%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(if (<= y -5.1e+200)
(* y (* (- t x) (/ 1.0 (- a z))))
(if (<= y 3.6e-14)
(+ x (* t (/ (- z y) (- z a))))
(* y (/ 1.0 (/ (- a z) (- t x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.1e+200) {
tmp = y * ((t - x) * (1.0 / (a - z)));
} else if (y <= 3.6e-14) {
tmp = x + (t * ((z - y) / (z - a)));
} else {
tmp = y * (1.0 / ((a - z) / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-5.1d+200)) then
tmp = y * ((t - x) * (1.0d0 / (a - z)))
else if (y <= 3.6d-14) then
tmp = x + (t * ((z - y) / (z - a)))
else
tmp = y * (1.0d0 / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.1e+200) {
tmp = y * ((t - x) * (1.0 / (a - z)));
} else if (y <= 3.6e-14) {
tmp = x + (t * ((z - y) / (z - a)));
} else {
tmp = y * (1.0 / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.1e+200: tmp = y * ((t - x) * (1.0 / (a - z))) elif y <= 3.6e-14: tmp = x + (t * ((z - y) / (z - a))) else: tmp = y * (1.0 / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.1e+200) tmp = Float64(y * Float64(Float64(t - x) * Float64(1.0 / Float64(a - z)))); elseif (y <= 3.6e-14) tmp = Float64(x + Float64(t * Float64(Float64(z - y) / Float64(z - a)))); else tmp = Float64(y * Float64(1.0 / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.1e+200) tmp = y * ((t - x) * (1.0 / (a - z))); elseif (y <= 3.6e-14) tmp = x + (t * ((z - y) / (z - a))); else tmp = y * (1.0 / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.1e+200], N[(y * N[(N[(t - x), $MachinePrecision] * N[(1.0 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e-14], N[(x + N[(t * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+200}:\\
\;\;\;\;y \cdot \left(\left(t - x\right) \cdot \frac{1}{a - z}\right)\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-14}:\\
\;\;\;\;x + t \cdot \frac{z - y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{1}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if y < -5.0999999999999999e200Initial program 57.1%
+-commutative57.1%
*-commutative57.1%
associate-/l*80.7%
fma-define80.7%
Simplified80.7%
Taylor expanded in y around inf 88.4%
sub-div88.4%
div-inv88.4%
Applied egg-rr88.4%
if -5.0999999999999999e200 < y < 3.5999999999999998e-14Initial program 71.2%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in t around inf 67.6%
associate-/l*77.6%
Simplified77.6%
if 3.5999999999999998e-14 < y Initial program 62.0%
+-commutative62.0%
*-commutative62.0%
associate-/l*86.7%
fma-define86.7%
Simplified86.7%
Taylor expanded in y around inf 75.0%
sub-div75.0%
div-inv75.0%
Applied egg-rr75.0%
*-commutative75.0%
associate-/r/75.0%
Simplified75.0%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.7e+78) (not (<= z 5e-117))) (* t (/ (- z y) (- z a))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.7e+78) || !(z <= 5e-117)) {
tmp = t * ((z - y) / (z - a));
} else {
tmp = x + ((t - x) / (a / 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 ((z <= (-4.7d+78)) .or. (.not. (z <= 5d-117))) then
tmp = t * ((z - y) / (z - a))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.7e+78) || !(z <= 5e-117)) {
tmp = t * ((z - y) / (z - a));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.7e+78) or not (z <= 5e-117): tmp = t * ((z - y) / (z - a)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.7e+78) || !(z <= 5e-117)) tmp = Float64(t * Float64(Float64(z - y) / Float64(z - a))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.7e+78) || ~((z <= 5e-117))) tmp = t * ((z - y) / (z - a)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.7e+78], N[Not[LessEqual[z, 5e-117]], $MachinePrecision]], N[(t * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+78} \lor \neg \left(z \leq 5 \cdot 10^{-117}\right):\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -4.70000000000000006e78 or 5e-117 < z Initial program 54.7%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in y around 0 58.7%
mul-1-neg58.7%
associate-/l*75.5%
distribute-lft-neg-out75.5%
+-commutative75.5%
div-sub75.5%
distribute-rgt-out75.5%
sub-neg75.5%
associate-/r/78.9%
Simplified78.9%
+-commutative78.9%
add-cube-cbrt78.0%
fma-define78.3%
pow278.3%
Applied egg-rr78.3%
Taylor expanded in t around inf 62.2%
div-sub62.2%
Simplified62.2%
if -4.70000000000000006e78 < z < 5e-117Initial program 83.4%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in y around 0 89.8%
mul-1-neg89.8%
associate-/l*86.6%
distribute-lft-neg-out86.6%
+-commutative86.6%
div-sub86.6%
distribute-rgt-out92.5%
sub-neg92.5%
associate-/r/93.9%
Simplified93.9%
Taylor expanded in z around 0 78.7%
Final simplification69.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.7e+78) (not (<= z 4.8e-117))) (* t (/ (- z y) (- z a))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.7e+78) || !(z <= 4.8e-117)) {
tmp = t * ((z - y) / (z - a));
} else {
tmp = x + (y * ((t - 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 ((z <= (-4.7d+78)) .or. (.not. (z <= 4.8d-117))) then
tmp = t * ((z - y) / (z - a))
else
tmp = x + (y * ((t - 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 ((z <= -4.7e+78) || !(z <= 4.8e-117)) {
tmp = t * ((z - y) / (z - a));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.7e+78) or not (z <= 4.8e-117): tmp = t * ((z - y) / (z - a)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.7e+78) || !(z <= 4.8e-117)) tmp = Float64(t * Float64(Float64(z - y) / Float64(z - a))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.7e+78) || ~((z <= 4.8e-117))) tmp = t * ((z - y) / (z - a)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.7e+78], N[Not[LessEqual[z, 4.8e-117]], $MachinePrecision]], N[(t * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+78} \lor \neg \left(z \leq 4.8 \cdot 10^{-117}\right):\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -4.70000000000000006e78 or 4.80000000000000028e-117 < z Initial program 54.7%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in y around 0 58.7%
mul-1-neg58.7%
associate-/l*75.5%
distribute-lft-neg-out75.5%
+-commutative75.5%
div-sub75.5%
distribute-rgt-out75.5%
sub-neg75.5%
associate-/r/78.9%
Simplified78.9%
+-commutative78.9%
add-cube-cbrt78.0%
fma-define78.3%
pow278.3%
Applied egg-rr78.3%
Taylor expanded in t around inf 62.2%
div-sub62.2%
Simplified62.2%
if -4.70000000000000006e78 < z < 4.80000000000000028e-117Initial program 83.4%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in z around 0 69.0%
associate-/l*77.0%
Simplified77.0%
Final simplification68.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2e-189) (not (<= t 1.08e-49))) (* t (/ (- z y) (- z a))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e-189) || !(t <= 1.08e-49)) {
tmp = t * ((z - y) / (z - a));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2d-189)) .or. (.not. (t <= 1.08d-49))) then
tmp = t * ((z - y) / (z - a))
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e-189) || !(t <= 1.08e-49)) {
tmp = t * ((z - y) / (z - a));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2e-189) or not (t <= 1.08e-49): tmp = t * ((z - y) / (z - a)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2e-189) || !(t <= 1.08e-49)) tmp = Float64(t * Float64(Float64(z - y) / Float64(z - a))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2e-189) || ~((t <= 1.08e-49))) tmp = t * ((z - y) / (z - a)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2e-189], N[Not[LessEqual[t, 1.08e-49]], $MachinePrecision]], N[(t * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-189} \lor \neg \left(t \leq 1.08 \cdot 10^{-49}\right):\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if t < -2.00000000000000014e-189 or 1.08e-49 < t Initial program 60.3%
associate-/l*85.4%
Simplified85.4%
Taylor expanded in y around 0 66.3%
mul-1-neg66.3%
associate-/l*82.5%
distribute-lft-neg-out82.5%
+-commutative82.5%
div-sub82.5%
distribute-rgt-out85.4%
sub-neg85.4%
associate-/r/86.2%
Simplified86.2%
+-commutative86.2%
add-cube-cbrt85.1%
fma-define85.1%
pow285.1%
Applied egg-rr85.1%
Taylor expanded in t around inf 66.3%
div-sub66.3%
Simplified66.3%
if -2.00000000000000014e-189 < t < 1.08e-49Initial program 80.5%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in y around 0 84.0%
mul-1-neg84.0%
associate-/l*77.2%
distribute-lft-neg-out77.2%
+-commutative77.2%
div-sub77.2%
distribute-rgt-out79.3%
sub-neg79.3%
associate-/r/84.9%
Simplified84.9%
Taylor expanded in z around 0 63.1%
Taylor expanded in x around inf 61.1%
mul-1-neg61.1%
unsub-neg61.1%
Simplified61.1%
Final simplification64.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.8e+79) (not (<= z 1.08e-76))) (* t (- (- -1.0) (/ y z))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e+79) || !(z <= 1.08e-76)) {
tmp = t * (-(-1.0) - (y / z));
} else {
tmp = x + (t / (a / 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 ((z <= (-1.8d+79)) .or. (.not. (z <= 1.08d-76))) then
tmp = t * (-(-1.0d0) - (y / z))
else
tmp = x + (t / (a / y))
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.8e+79) || !(z <= 1.08e-76)) {
tmp = t * (-(-1.0) - (y / z));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.8e+79) or not (z <= 1.08e-76): tmp = t * (-(-1.0) - (y / z)) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.8e+79) || !(z <= 1.08e-76)) tmp = Float64(t * Float64(Float64(-(-1.0)) - Float64(y / z))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.8e+79) || ~((z <= 1.08e-76))) tmp = t * (-(-1.0) - (y / z)); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e+79], N[Not[LessEqual[z, 1.08e-76]], $MachinePrecision]], N[(t * N[((--1.0) - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+79} \lor \neg \left(z \leq 1.08 \cdot 10^{-76}\right):\\
\;\;\;\;t \cdot \left(\left(--1\right) - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.8e79 or 1.08e-76 < z Initial program 54.0%
associate-/l*75.1%
Simplified75.1%
Taylor expanded in t around inf 73.1%
+-commutative73.1%
mul-1-neg73.1%
unsub-neg73.1%
Simplified73.1%
Taylor expanded in a around 0 51.1%
Taylor expanded in x around 0 37.4%
mul-1-neg37.4%
associate-/l*54.0%
div-sub54.0%
*-inverses54.0%
*-commutative54.0%
distribute-rgt-neg-in54.0%
sub-neg54.0%
metadata-eval54.0%
Simplified54.0%
if -1.8e79 < z < 1.08e-76Initial program 83.7%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in y around 0 89.9%
mul-1-neg89.9%
associate-/l*86.9%
distribute-lft-neg-out86.9%
+-commutative86.9%
div-sub86.8%
distribute-rgt-out92.7%
sub-neg92.7%
associate-/r/94.0%
Simplified94.0%
Taylor expanded in z around 0 78.2%
Taylor expanded in t around inf 63.3%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.2e+79) t (if (<= z 1.5e+113) (+ x (/ t (/ a y))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e+79) {
tmp = t;
} else if (z <= 1.5e+113) {
tmp = x + (t / (a / y));
} else {
tmp = 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 (z <= (-4.2d+79)) then
tmp = t
else if (z <= 1.5d+113) then
tmp = x + (t / (a / y))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e+79) {
tmp = t;
} else if (z <= 1.5e+113) {
tmp = x + (t / (a / y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.2e+79: tmp = t elif z <= 1.5e+113: tmp = x + (t / (a / y)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e+79) tmp = t; elseif (z <= 1.5e+113) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.2e+79) tmp = t; elseif (z <= 1.5e+113) tmp = x + (t / (a / y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+79], t, If[LessEqual[z, 1.5e+113], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+79}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+113}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.20000000000000016e79 or 1.5e113 < z Initial program 44.5%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in y around 0 48.8%
mul-1-neg48.8%
associate-/l*72.2%
distribute-lft-neg-out72.2%
+-commutative72.2%
div-sub72.2%
distribute-rgt-out72.2%
sub-neg72.2%
associate-/r/77.4%
Simplified77.4%
Taylor expanded in z around inf 50.1%
if -4.20000000000000016e79 < z < 1.5e113Initial program 80.7%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in y around 0 86.3%
mul-1-neg86.3%
associate-/l*85.2%
distribute-lft-neg-out85.2%
+-commutative85.2%
div-sub85.2%
distribute-rgt-out89.4%
sub-neg89.4%
associate-/r/90.4%
Simplified90.4%
Taylor expanded in z around 0 66.7%
Taylor expanded in t around inf 54.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.2e+92) t (if (<= z 1.6e+67) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+92) {
tmp = t;
} else if (z <= 1.6e+67) {
tmp = x * (1.0 - (y / a));
} else {
tmp = 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 (z <= (-8.2d+92)) then
tmp = t
else if (z <= 1.6d+67) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+92) {
tmp = t;
} else if (z <= 1.6e+67) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.2e+92: tmp = t elif z <= 1.6e+67: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.2e+92) tmp = t; elseif (z <= 1.6e+67) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.2e+92) tmp = t; elseif (z <= 1.6e+67) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.2e+92], t, If[LessEqual[z, 1.6e+67], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+92}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+67}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.20000000000000047e92 or 1.59999999999999991e67 < z Initial program 47.0%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in y around 0 50.9%
mul-1-neg50.9%
associate-/l*73.5%
distribute-lft-neg-out73.5%
+-commutative73.5%
div-sub73.5%
distribute-rgt-out73.4%
sub-neg73.4%
associate-/r/78.2%
Simplified78.2%
Taylor expanded in z around inf 47.5%
if -8.20000000000000047e92 < z < 1.59999999999999991e67Initial program 81.0%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in y around 0 86.8%
mul-1-neg86.8%
associate-/l*85.1%
distribute-lft-neg-out85.1%
+-commutative85.1%
div-sub85.1%
distribute-rgt-out89.5%
sub-neg89.5%
associate-/r/90.5%
Simplified90.5%
Taylor expanded in z around 0 68.7%
Taylor expanded in x around inf 52.1%
mul-1-neg52.1%
unsub-neg52.1%
Simplified52.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.1e+22) x (if (<= a 4.6e+64) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.1e+22) {
tmp = x;
} else if (a <= 4.6e+64) {
tmp = 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 <= (-3.1d+22)) then
tmp = x
else if (a <= 4.6d+64) then
tmp = 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 <= -3.1e+22) {
tmp = x;
} else if (a <= 4.6e+64) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.1e+22: tmp = x elif a <= 4.6e+64: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.1e+22) tmp = x; elseif (a <= 4.6e+64) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.1e+22) tmp = x; elseif (a <= 4.6e+64) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.1e+22], x, If[LessEqual[a, 4.6e+64], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{+64}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.1000000000000002e22 or 4.6e64 < a Initial program 67.1%
+-commutative67.1%
*-commutative67.1%
associate-/l*92.5%
fma-define92.5%
Simplified92.5%
Taylor expanded in a around inf 47.9%
if -3.1000000000000002e22 < a < 4.6e64Initial program 68.3%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in y around 0 68.1%
mul-1-neg68.1%
associate-/l*71.7%
distribute-lft-neg-out71.7%
+-commutative71.7%
div-sub71.7%
distribute-rgt-out77.0%
sub-neg77.0%
associate-/r/79.1%
Simplified79.1%
Taylor expanded in z around inf 40.2%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 67.7%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in y around 0 72.8%
mul-1-neg72.8%
associate-/l*80.5%
distribute-lft-neg-out80.5%
+-commutative80.5%
div-sub80.5%
distribute-rgt-out83.2%
sub-neg83.2%
associate-/r/85.7%
Simplified85.7%
Taylor expanded in z around inf 26.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024185
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))