
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
Initial program 97.5%
associate-*l/83.5%
associate-/l*88.5%
Simplified88.5%
associate-*r/83.5%
associate-*l/97.5%
*-commutative97.5%
clear-num97.1%
un-div-inv97.6%
Applied egg-rr97.6%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y))))
(t_2 (* t (/ x (- z y))))
(t_3 (* t (/ (- y x) y))))
(if (<= y -5.6e-49)
t_1
(if (<= y -7e-261)
t_2
(if (<= y 8.5e-224)
(* (- x y) (/ t z))
(if (<= y 1.7e+54)
t_2
(if (<= y 2.5e+129)
t_3
(if (<= y 1.95e+137) t_2 (if (<= y 9.2e+188) t_1 t_3)))))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double t_2 = t * (x / (z - y));
double t_3 = t * ((y - x) / y);
double tmp;
if (y <= -5.6e-49) {
tmp = t_1;
} else if (y <= -7e-261) {
tmp = t_2;
} else if (y <= 8.5e-224) {
tmp = (x - y) * (t / z);
} else if (y <= 1.7e+54) {
tmp = t_2;
} else if (y <= 2.5e+129) {
tmp = t_3;
} else if (y <= 1.95e+137) {
tmp = t_2;
} else if (y <= 9.2e+188) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t / (1.0d0 - (z / y))
t_2 = t * (x / (z - y))
t_3 = t * ((y - x) / y)
if (y <= (-5.6d-49)) then
tmp = t_1
else if (y <= (-7d-261)) then
tmp = t_2
else if (y <= 8.5d-224) then
tmp = (x - y) * (t / z)
else if (y <= 1.7d+54) then
tmp = t_2
else if (y <= 2.5d+129) then
tmp = t_3
else if (y <= 1.95d+137) then
tmp = t_2
else if (y <= 9.2d+188) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double t_2 = t * (x / (z - y));
double t_3 = t * ((y - x) / y);
double tmp;
if (y <= -5.6e-49) {
tmp = t_1;
} else if (y <= -7e-261) {
tmp = t_2;
} else if (y <= 8.5e-224) {
tmp = (x - y) * (t / z);
} else if (y <= 1.7e+54) {
tmp = t_2;
} else if (y <= 2.5e+129) {
tmp = t_3;
} else if (y <= 1.95e+137) {
tmp = t_2;
} else if (y <= 9.2e+188) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) t_2 = t * (x / (z - y)) t_3 = t * ((y - x) / y) tmp = 0 if y <= -5.6e-49: tmp = t_1 elif y <= -7e-261: tmp = t_2 elif y <= 8.5e-224: tmp = (x - y) * (t / z) elif y <= 1.7e+54: tmp = t_2 elif y <= 2.5e+129: tmp = t_3 elif y <= 1.95e+137: tmp = t_2 elif y <= 9.2e+188: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) t_2 = Float64(t * Float64(x / Float64(z - y))) t_3 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -5.6e-49) tmp = t_1; elseif (y <= -7e-261) tmp = t_2; elseif (y <= 8.5e-224) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 1.7e+54) tmp = t_2; elseif (y <= 2.5e+129) tmp = t_3; elseif (y <= 1.95e+137) tmp = t_2; elseif (y <= 9.2e+188) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); t_2 = t * (x / (z - y)); t_3 = t * ((y - x) / y); tmp = 0.0; if (y <= -5.6e-49) tmp = t_1; elseif (y <= -7e-261) tmp = t_2; elseif (y <= 8.5e-224) tmp = (x - y) * (t / z); elseif (y <= 1.7e+54) tmp = t_2; elseif (y <= 2.5e+129) tmp = t_3; elseif (y <= 1.95e+137) tmp = t_2; elseif (y <= 9.2e+188) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e-49], t$95$1, If[LessEqual[y, -7e-261], t$95$2, If[LessEqual[y, 8.5e-224], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+54], t$95$2, If[LessEqual[y, 2.5e+129], t$95$3, If[LessEqual[y, 1.95e+137], t$95$2, If[LessEqual[y, 9.2e+188], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
t_2 := t \cdot \frac{x}{z - y}\\
t_3 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-261}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-224}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+54}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+129}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -5.59999999999999995e-49 or 1.95000000000000015e137 < y < 9.20000000000000046e188Initial program 99.9%
associate-*l/78.2%
associate-/l*80.8%
Simplified80.8%
associate-*r/78.2%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 81.6%
mul-1-neg81.6%
unsub-neg81.6%
Simplified81.6%
if -5.59999999999999995e-49 < y < -6.9999999999999995e-261 or 8.4999999999999996e-224 < y < 1.7e54 or 2.5000000000000001e129 < y < 1.95000000000000015e137Initial program 97.7%
Taylor expanded in x around inf 81.5%
if -6.9999999999999995e-261 < y < 8.4999999999999996e-224Initial program 87.9%
associate-*l/99.8%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
associate-/l*96.7%
Simplified96.7%
if 1.7e54 < y < 2.5000000000000001e129 or 9.20000000000000046e188 < y Initial program 99.9%
associate-*l/60.8%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in z around 0 56.6%
associate-*r/56.6%
mul-1-neg56.6%
distribute-lft-neg-out56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in x around 0 75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in y around 0 54.0%
distribute-lft-out--56.6%
associate-/l*95.6%
Simplified95.6%
Final simplification86.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y))))
(t_2 (* t (/ (- y x) y)))
(t_3 (/ t (- 1.0 (/ z y)))))
(if (<= y -5.1e-49)
t_3
(if (<= y -1.6e-259)
t_1
(if (<= y 9.5e-225)
(* (- x y) (/ t z))
(if (<= y 2.3e+54)
(/ t (/ (- z y) x))
(if (<= y 2.5e+129)
t_2
(if (<= y 1.75e+137) t_1 (if (<= y 8.6e+192) t_3 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double t_2 = t * ((y - x) / y);
double t_3 = t / (1.0 - (z / y));
double tmp;
if (y <= -5.1e-49) {
tmp = t_3;
} else if (y <= -1.6e-259) {
tmp = t_1;
} else if (y <= 9.5e-225) {
tmp = (x - y) * (t / z);
} else if (y <= 2.3e+54) {
tmp = t / ((z - y) / x);
} else if (y <= 2.5e+129) {
tmp = t_2;
} else if (y <= 1.75e+137) {
tmp = t_1;
} else if (y <= 8.6e+192) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * (x / (z - y))
t_2 = t * ((y - x) / y)
t_3 = t / (1.0d0 - (z / y))
if (y <= (-5.1d-49)) then
tmp = t_3
else if (y <= (-1.6d-259)) then
tmp = t_1
else if (y <= 9.5d-225) then
tmp = (x - y) * (t / z)
else if (y <= 2.3d+54) then
tmp = t / ((z - y) / x)
else if (y <= 2.5d+129) then
tmp = t_2
else if (y <= 1.75d+137) then
tmp = t_1
else if (y <= 8.6d+192) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double t_2 = t * ((y - x) / y);
double t_3 = t / (1.0 - (z / y));
double tmp;
if (y <= -5.1e-49) {
tmp = t_3;
} else if (y <= -1.6e-259) {
tmp = t_1;
} else if (y <= 9.5e-225) {
tmp = (x - y) * (t / z);
} else if (y <= 2.3e+54) {
tmp = t / ((z - y) / x);
} else if (y <= 2.5e+129) {
tmp = t_2;
} else if (y <= 1.75e+137) {
tmp = t_1;
} else if (y <= 8.6e+192) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) t_2 = t * ((y - x) / y) t_3 = t / (1.0 - (z / y)) tmp = 0 if y <= -5.1e-49: tmp = t_3 elif y <= -1.6e-259: tmp = t_1 elif y <= 9.5e-225: tmp = (x - y) * (t / z) elif y <= 2.3e+54: tmp = t / ((z - y) / x) elif y <= 2.5e+129: tmp = t_2 elif y <= 1.75e+137: tmp = t_1 elif y <= 8.6e+192: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) t_2 = Float64(t * Float64(Float64(y - x) / y)) t_3 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -5.1e-49) tmp = t_3; elseif (y <= -1.6e-259) tmp = t_1; elseif (y <= 9.5e-225) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 2.3e+54) tmp = Float64(t / Float64(Float64(z - y) / x)); elseif (y <= 2.5e+129) tmp = t_2; elseif (y <= 1.75e+137) tmp = t_1; elseif (y <= 8.6e+192) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); t_2 = t * ((y - x) / y); t_3 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -5.1e-49) tmp = t_3; elseif (y <= -1.6e-259) tmp = t_1; elseif (y <= 9.5e-225) tmp = (x - y) * (t / z); elseif (y <= 2.3e+54) tmp = t / ((z - y) / x); elseif (y <= 2.5e+129) tmp = t_2; elseif (y <= 1.75e+137) tmp = t_1; elseif (y <= 8.6e+192) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.1e-49], t$95$3, If[LessEqual[y, -1.6e-259], t$95$1, If[LessEqual[y, 9.5e-225], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+54], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+129], t$95$2, If[LessEqual[y, 1.75e+137], t$95$1, If[LessEqual[y, 8.6e+192], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
t_2 := t \cdot \frac{y - x}{y}\\
t_3 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -5.1 \cdot 10^{-49}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-259}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-225}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+54}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+192}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.10000000000000026e-49 or 1.7500000000000001e137 < y < 8.59999999999999952e192Initial program 99.9%
associate-*l/78.2%
associate-/l*80.8%
Simplified80.8%
associate-*r/78.2%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 81.6%
mul-1-neg81.6%
unsub-neg81.6%
Simplified81.6%
if -5.10000000000000026e-49 < y < -1.59999999999999994e-259 or 2.5000000000000001e129 < y < 1.7500000000000001e137Initial program 97.5%
Taylor expanded in x around inf 88.3%
if -1.59999999999999994e-259 < y < 9.50000000000000006e-225Initial program 87.9%
associate-*l/99.8%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
associate-/l*96.7%
Simplified96.7%
if 9.50000000000000006e-225 < y < 2.29999999999999994e54Initial program 97.8%
associate-*l/92.5%
associate-/l*98.5%
Simplified98.5%
associate-*r/92.5%
associate-*l/97.8%
*-commutative97.8%
clear-num97.8%
un-div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in x around inf 75.9%
if 2.29999999999999994e54 < y < 2.5000000000000001e129 or 8.59999999999999952e192 < y Initial program 99.9%
associate-*l/60.8%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in z around 0 56.6%
associate-*r/56.6%
mul-1-neg56.6%
distribute-lft-neg-out56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in x around 0 75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in y around 0 54.0%
distribute-lft-out--56.6%
associate-/l*95.6%
Simplified95.6%
Final simplification86.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -5.8e-49)
t_1
(if (<= y 2e+54)
(/ (* t x) (- z y))
(if (or (<= y 1.06e+127) (not (<= y 2.25e+188)))
(* t (/ (- y x) y))
t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -5.8e-49) {
tmp = t_1;
} else if (y <= 2e+54) {
tmp = (t * x) / (z - y);
} else if ((y <= 1.06e+127) || !(y <= 2.25e+188)) {
tmp = t * ((y - x) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t / (1.0d0 - (z / y))
if (y <= (-5.8d-49)) then
tmp = t_1
else if (y <= 2d+54) then
tmp = (t * x) / (z - y)
else if ((y <= 1.06d+127) .or. (.not. (y <= 2.25d+188))) then
tmp = t * ((y - 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 t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -5.8e-49) {
tmp = t_1;
} else if (y <= 2e+54) {
tmp = (t * x) / (z - y);
} else if ((y <= 1.06e+127) || !(y <= 2.25e+188)) {
tmp = t * ((y - x) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -5.8e-49: tmp = t_1 elif y <= 2e+54: tmp = (t * x) / (z - y) elif (y <= 1.06e+127) or not (y <= 2.25e+188): tmp = t * ((y - x) / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -5.8e-49) tmp = t_1; elseif (y <= 2e+54) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif ((y <= 1.06e+127) || !(y <= 2.25e+188)) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -5.8e-49) tmp = t_1; elseif (y <= 2e+54) tmp = (t * x) / (z - y); elseif ((y <= 1.06e+127) || ~((y <= 2.25e+188))) tmp = t * ((y - x) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e-49], t$95$1, If[LessEqual[y, 2e+54], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.06e+127], N[Not[LessEqual[y, 2.25e+188]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+127} \lor \neg \left(y \leq 2.25 \cdot 10^{+188}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.8e-49 or 1.06000000000000006e127 < y < 2.25000000000000005e188Initial program 99.9%
associate-*l/78.1%
associate-/l*80.6%
Simplified80.6%
associate-*r/78.1%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 80.1%
mul-1-neg80.1%
unsub-neg80.1%
Simplified80.1%
if -5.8e-49 < y < 2.0000000000000002e54Initial program 95.1%
associate-*l/95.2%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 82.8%
if 2.0000000000000002e54 < y < 1.06000000000000006e127 or 2.25000000000000005e188 < y Initial program 99.9%
associate-*l/60.0%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in z around 0 55.6%
associate-*r/55.6%
mul-1-neg55.6%
distribute-lft-neg-out55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in x around 0 74.5%
mul-1-neg74.5%
unsub-neg74.5%
Simplified74.5%
Taylor expanded in y around 0 53.0%
distribute-lft-out--55.6%
associate-/l*95.5%
Simplified95.5%
Final simplification84.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.1e-49)
(* t (/ y (- y z)))
(if (<= y 1.45e+54)
(/ (* t x) (- z y))
(if (or (<= y 8e+126) (not (<= y 4.4e+189)))
(* t (/ (- y x) y))
(/ t (- 1.0 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.1e-49) {
tmp = t * (y / (y - z));
} else if (y <= 1.45e+54) {
tmp = (t * x) / (z - y);
} else if ((y <= 8e+126) || !(y <= 4.4e+189)) {
tmp = t * ((y - x) / y);
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.1d-49)) then
tmp = t * (y / (y - z))
else if (y <= 1.45d+54) then
tmp = (t * x) / (z - y)
else if ((y <= 8d+126) .or. (.not. (y <= 4.4d+189))) then
tmp = t * ((y - x) / y)
else
tmp = t / (1.0d0 - (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.1e-49) {
tmp = t * (y / (y - z));
} else if (y <= 1.45e+54) {
tmp = (t * x) / (z - y);
} else if ((y <= 8e+126) || !(y <= 4.4e+189)) {
tmp = t * ((y - x) / y);
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.1e-49: tmp = t * (y / (y - z)) elif y <= 1.45e+54: tmp = (t * x) / (z - y) elif (y <= 8e+126) or not (y <= 4.4e+189): tmp = t * ((y - x) / y) else: tmp = t / (1.0 - (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.1e-49) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (y <= 1.45e+54) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif ((y <= 8e+126) || !(y <= 4.4e+189)) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(t / Float64(1.0 - Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.1e-49) tmp = t * (y / (y - z)); elseif (y <= 1.45e+54) tmp = (t * x) / (z - y); elseif ((y <= 8e+126) || ~((y <= 4.4e+189))) tmp = t * ((y - x) / y); else tmp = t / (1.0 - (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.1e-49], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+54], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 8e+126], N[Not[LessEqual[y, 4.4e+189]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{-49}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+126} \lor \neg \left(y \leq 4.4 \cdot 10^{+189}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\end{array}
\end{array}
if y < -5.10000000000000026e-49Initial program 99.9%
Taylor expanded in x around 0 79.1%
neg-mul-179.1%
distribute-neg-frac279.1%
Simplified79.1%
if -5.10000000000000026e-49 < y < 1.4499999999999999e54Initial program 95.1%
associate-*l/95.2%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 82.8%
if 1.4499999999999999e54 < y < 7.9999999999999994e126 or 4.4000000000000001e189 < y Initial program 99.9%
associate-*l/60.0%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in z around 0 55.6%
associate-*r/55.6%
mul-1-neg55.6%
distribute-lft-neg-out55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in x around 0 74.5%
mul-1-neg74.5%
unsub-neg74.5%
Simplified74.5%
Taylor expanded in y around 0 53.0%
distribute-lft-out--55.6%
associate-/l*95.5%
Simplified95.5%
if 7.9999999999999994e126 < y < 4.4000000000000001e189Initial program 100.0%
associate-*l/79.0%
associate-/l*73.6%
Simplified73.6%
associate-*r/79.0%
associate-*l/100.0%
*-commutative100.0%
clear-num99.9%
un-div-inv99.8%
Applied egg-rr99.8%
div-sub99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 84.0%
mul-1-neg84.0%
unsub-neg84.0%
Simplified84.0%
Final simplification84.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.8e-49)
(* t (/ y (- y z)))
(if (<= y 1.5e+54)
(/ (* t x) (- z y))
(if (<= y 1.25e+127)
(* t (/ (- y x) y))
(if (<= y 2.65e+190) (/ t (- 1.0 (/ z y))) (/ t (/ y (- y x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e-49) {
tmp = t * (y / (y - z));
} else if (y <= 1.5e+54) {
tmp = (t * x) / (z - y);
} else if (y <= 1.25e+127) {
tmp = t * ((y - x) / y);
} else if (y <= 2.65e+190) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t / (y / (y - x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.8d-49)) then
tmp = t * (y / (y - z))
else if (y <= 1.5d+54) then
tmp = (t * x) / (z - y)
else if (y <= 1.25d+127) then
tmp = t * ((y - x) / y)
else if (y <= 2.65d+190) then
tmp = t / (1.0d0 - (z / y))
else
tmp = t / (y / (y - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e-49) {
tmp = t * (y / (y - z));
} else if (y <= 1.5e+54) {
tmp = (t * x) / (z - y);
} else if (y <= 1.25e+127) {
tmp = t * ((y - x) / y);
} else if (y <= 2.65e+190) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t / (y / (y - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e-49: tmp = t * (y / (y - z)) elif y <= 1.5e+54: tmp = (t * x) / (z - y) elif y <= 1.25e+127: tmp = t * ((y - x) / y) elif y <= 2.65e+190: tmp = t / (1.0 - (z / y)) else: tmp = t / (y / (y - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e-49) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (y <= 1.5e+54) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 1.25e+127) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= 2.65e+190) tmp = Float64(t / Float64(1.0 - Float64(z / y))); else tmp = Float64(t / Float64(y / Float64(y - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.8e-49) tmp = t * (y / (y - z)); elseif (y <= 1.5e+54) tmp = (t * x) / (z - y); elseif (y <= 1.25e+127) tmp = t * ((y - x) / y); elseif (y <= 2.65e+190) tmp = t / (1.0 - (z / y)); else tmp = t / (y / (y - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e-49], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+54], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+127], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.65e+190], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-49}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+127}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+190}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\end{array}
\end{array}
if y < -5.8e-49Initial program 99.9%
Taylor expanded in x around 0 79.1%
neg-mul-179.1%
distribute-neg-frac279.1%
Simplified79.1%
if -5.8e-49 < y < 1.4999999999999999e54Initial program 95.1%
associate-*l/95.2%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 82.8%
if 1.4999999999999999e54 < y < 1.2500000000000001e127Initial program 99.8%
associate-*l/74.8%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in z around 0 61.7%
associate-*r/61.7%
mul-1-neg61.7%
distribute-lft-neg-out61.7%
*-commutative61.7%
Simplified61.7%
Taylor expanded in x around 0 74.1%
mul-1-neg74.1%
unsub-neg74.1%
Simplified74.1%
Taylor expanded in y around 0 55.0%
distribute-lft-out--61.7%
associate-/l*86.7%
Simplified86.7%
if 1.2500000000000001e127 < y < 2.65000000000000007e190Initial program 100.0%
associate-*l/79.0%
associate-/l*73.6%
Simplified73.6%
associate-*r/79.0%
associate-*l/100.0%
*-commutative100.0%
clear-num99.9%
un-div-inv99.8%
Applied egg-rr99.8%
div-sub99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 84.0%
mul-1-neg84.0%
unsub-neg84.0%
Simplified84.0%
if 2.65000000000000007e190 < y Initial program 99.9%
associate-*l/52.6%
associate-/l*75.2%
Simplified75.2%
associate-*r/52.6%
associate-*l/99.9%
*-commutative99.9%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 100.0%
neg-mul-1100.0%
distribute-neg-frac100.0%
Simplified100.0%
Final simplification84.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.5e-41)
t
(if (<= y 1.05e-135)
(/ (* t x) z)
(if (<= y 9.6e+137) (* t (/ x (- y))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-41) {
tmp = t;
} else if (y <= 1.05e-135) {
tmp = (t * x) / z;
} else if (y <= 9.6e+137) {
tmp = t * (x / -y);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.5d-41)) then
tmp = t
else if (y <= 1.05d-135) then
tmp = (t * x) / z
else if (y <= 9.6d+137) then
tmp = t * (x / -y)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-41) {
tmp = t;
} else if (y <= 1.05e-135) {
tmp = (t * x) / z;
} else if (y <= 9.6e+137) {
tmp = t * (x / -y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.5e-41: tmp = t elif y <= 1.05e-135: tmp = (t * x) / z elif y <= 9.6e+137: tmp = t * (x / -y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.5e-41) tmp = t; elseif (y <= 1.05e-135) tmp = Float64(Float64(t * x) / z); elseif (y <= 9.6e+137) tmp = Float64(t * Float64(x / Float64(-y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.5e-41) tmp = t; elseif (y <= 1.05e-135) tmp = (t * x) / z; elseif (y <= 9.6e+137) tmp = t * (x / -y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.5e-41], t, If[LessEqual[y, 1.05e-135], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 9.6e+137], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-41}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-135}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+137}:\\
\;\;\;\;t \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.4999999999999998e-41 or 9.59999999999999932e137 < y Initial program 99.9%
associate-*l/70.6%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in y around inf 66.3%
if -2.4999999999999998e-41 < y < 1.05e-135Initial program 94.0%
associate-*l/97.4%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in y around 0 82.3%
if 1.05e-135 < y < 9.59999999999999932e137Initial program 98.2%
associate-*l/86.2%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in z around 0 57.2%
associate-*r/57.2%
mul-1-neg57.2%
distribute-lft-neg-out57.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in x around inf 42.3%
mul-1-neg42.3%
associate-/l*44.8%
distribute-rgt-neg-in44.8%
distribute-neg-frac244.8%
Simplified44.8%
Final simplification66.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e-33)
t
(if (<= y 2.1e-135)
(/ (* t x) z)
(if (<= y 1.12e+143) (/ t (/ (- y) x)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e-33) {
tmp = t;
} else if (y <= 2.1e-135) {
tmp = (t * x) / z;
} else if (y <= 1.12e+143) {
tmp = t / (-y / x);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1d-33)) then
tmp = t
else if (y <= 2.1d-135) then
tmp = (t * x) / z
else if (y <= 1.12d+143) then
tmp = t / (-y / x)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e-33) {
tmp = t;
} else if (y <= 2.1e-135) {
tmp = (t * x) / z;
} else if (y <= 1.12e+143) {
tmp = t / (-y / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e-33: tmp = t elif y <= 2.1e-135: tmp = (t * x) / z elif y <= 1.12e+143: tmp = t / (-y / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e-33) tmp = t; elseif (y <= 2.1e-135) tmp = Float64(Float64(t * x) / z); elseif (y <= 1.12e+143) tmp = Float64(t / Float64(Float64(-y) / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e-33) tmp = t; elseif (y <= 2.1e-135) tmp = (t * x) / z; elseif (y <= 1.12e+143) tmp = t / (-y / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e-33], t, If[LessEqual[y, 2.1e-135], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.12e+143], N[(t / N[((-y) / x), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-33}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-135}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+143}:\\
\;\;\;\;\frac{t}{\frac{-y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.0000000000000001e-33 or 1.12e143 < y Initial program 99.9%
associate-*l/70.6%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in y around inf 66.3%
if -1.0000000000000001e-33 < y < 2.1e-135Initial program 94.0%
associate-*l/97.4%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in y around 0 82.3%
if 2.1e-135 < y < 1.12e143Initial program 98.2%
associate-*l/86.2%
associate-/l*95.6%
Simplified95.6%
associate-*r/86.2%
associate-*l/98.2%
*-commutative98.2%
clear-num98.1%
un-div-inv98.3%
Applied egg-rr98.3%
Taylor expanded in x around inf 67.4%
Taylor expanded in z around 0 44.8%
neg-mul-144.8%
distribute-neg-frac244.8%
Simplified44.8%
Final simplification66.4%
(FPCore (x y z t) :precision binary64 (if (<= y -8.6e+228) (/ t (- 1.0 (/ z y))) (if (<= y 4.3e+167) (* (- x y) (/ t (- z y))) (/ t (/ y (- y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e+228) {
tmp = t / (1.0 - (z / y));
} else if (y <= 4.3e+167) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t / (y / (y - x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.6d+228)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 4.3d+167) then
tmp = (x - y) * (t / (z - y))
else
tmp = t / (y / (y - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e+228) {
tmp = t / (1.0 - (z / y));
} else if (y <= 4.3e+167) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t / (y / (y - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.6e+228: tmp = t / (1.0 - (z / y)) elif y <= 4.3e+167: tmp = (x - y) * (t / (z - y)) else: tmp = t / (y / (y - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.6e+228) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 4.3e+167) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t / Float64(y / Float64(y - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.6e+228) tmp = t / (1.0 - (z / y)); elseif (y <= 4.3e+167) tmp = (x - y) * (t / (z - y)); else tmp = t / (y / (y - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.6e+228], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e+167], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+228}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+167}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\end{array}
\end{array}
if y < -8.60000000000000063e228Initial program 100.0%
associate-*l/57.8%
associate-/l*54.6%
Simplified54.6%
associate-*r/57.8%
associate-*l/100.0%
*-commutative100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
div-sub100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
if -8.60000000000000063e228 < y < 4.3000000000000002e167Initial program 96.9%
associate-*l/90.0%
associate-/l*93.7%
Simplified93.7%
if 4.3000000000000002e167 < y Initial program 100.0%
associate-*l/57.9%
associate-/l*74.1%
Simplified74.1%
associate-*r/57.9%
associate-*l/100.0%
*-commutative100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 95.7%
neg-mul-195.7%
distribute-neg-frac95.7%
Simplified95.7%
Final simplification94.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.2e-74) (not (<= y 1.05e-135))) (* t (/ (- y x) y)) (/ (* t x) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.2e-74) || !(y <= 1.05e-135)) {
tmp = t * ((y - x) / y);
} else {
tmp = (t * x) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.2d-74)) .or. (.not. (y <= 1.05d-135))) then
tmp = t * ((y - x) / y)
else
tmp = (t * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.2e-74) || !(y <= 1.05e-135)) {
tmp = t * ((y - x) / y);
} else {
tmp = (t * x) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.2e-74) or not (y <= 1.05e-135): tmp = t * ((y - x) / y) else: tmp = (t * x) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.2e-74) || !(y <= 1.05e-135)) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(Float64(t * x) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.2e-74) || ~((y <= 1.05e-135))) tmp = t * ((y - x) / y); else tmp = (t * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.2e-74], N[Not[LessEqual[y, 1.05e-135]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-74} \lor \neg \left(y \leq 1.05 \cdot 10^{-135}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\end{array}
\end{array}
if y < -4.2e-74 or 1.05e-135 < y Initial program 99.3%
associate-*l/77.3%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in z around 0 57.9%
associate-*r/57.9%
mul-1-neg57.9%
distribute-lft-neg-out57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in x around 0 68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
Taylor expanded in y around 0 56.6%
distribute-lft-out--57.9%
associate-/l*74.8%
Simplified74.8%
if -4.2e-74 < y < 1.05e-135Initial program 93.5%
associate-*l/97.2%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in y around 0 86.8%
Final simplification78.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.6e-76) (not (<= y 2.1e-135))) (* t (/ (- y x) y)) (* (- x y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.6e-76) || !(y <= 2.1e-135)) {
tmp = t * ((y - x) / y);
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.6d-76)) .or. (.not. (y <= 2.1d-135))) then
tmp = t * ((y - x) / y)
else
tmp = (x - y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.6e-76) || !(y <= 2.1e-135)) {
tmp = t * ((y - x) / y);
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.6e-76) or not (y <= 2.1e-135): tmp = t * ((y - x) / y) else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.6e-76) || !(y <= 2.1e-135)) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.6e-76) || ~((y <= 2.1e-135))) tmp = t * ((y - x) / y); else tmp = (x - y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.6e-76], N[Not[LessEqual[y, 2.1e-135]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-76} \lor \neg \left(y \leq 2.1 \cdot 10^{-135}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -1.5999999999999999e-76 or 2.1e-135 < y Initial program 99.3%
associate-*l/77.3%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in z around 0 57.9%
associate-*r/57.9%
mul-1-neg57.9%
distribute-lft-neg-out57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in x around 0 68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
Taylor expanded in y around 0 56.6%
distribute-lft-out--57.9%
associate-/l*74.8%
Simplified74.8%
if -1.5999999999999999e-76 < y < 2.1e-135Initial program 93.5%
associate-*l/97.2%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around inf 90.7%
*-commutative90.7%
associate-/l*89.2%
Simplified89.2%
Final simplification79.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.5e-38) (not (<= y 2.15e+54))) (* t (/ (- y x) y)) (* t (/ x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-38) || !(y <= 2.15e+54)) {
tmp = t * ((y - x) / y);
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.5d-38)) .or. (.not. (y <= 2.15d+54))) then
tmp = t * ((y - x) / y)
else
tmp = t * (x / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-38) || !(y <= 2.15e+54)) {
tmp = t * ((y - x) / y);
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.5e-38) or not (y <= 2.15e+54): tmp = t * ((y - x) / y) else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.5e-38) || !(y <= 2.15e+54)) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(t * Float64(x / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.5e-38) || ~((y <= 2.15e+54))) tmp = t * ((y - x) / y); else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.5e-38], N[Not[LessEqual[y, 2.15e+54]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-38} \lor \neg \left(y \leq 2.15 \cdot 10^{+54}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -4.50000000000000009e-38 or 2.14999999999999988e54 < y Initial program 99.9%
associate-*l/71.5%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in z around 0 57.6%
associate-*r/57.6%
mul-1-neg57.6%
distribute-lft-neg-out57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in x around 0 73.4%
mul-1-neg73.4%
unsub-neg73.4%
Simplified73.4%
Taylor expanded in y around 0 56.6%
distribute-lft-out--57.6%
associate-/l*81.8%
Simplified81.8%
if -4.50000000000000009e-38 < y < 2.14999999999999988e54Initial program 95.1%
Taylor expanded in x around inf 81.2%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1.15e-33) t (if (<= y 1.55e+54) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-33) {
tmp = t;
} else if (y <= 1.55e+54) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.15d-33)) then
tmp = t
else if (y <= 1.55d+54) then
tmp = 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 tmp;
if (y <= -1.15e-33) {
tmp = t;
} else if (y <= 1.55e+54) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15e-33: tmp = t elif y <= 1.55e+54: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.15e-33) tmp = t; elseif (y <= 1.55e+54) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.15e-33) tmp = t; elseif (y <= 1.55e+54) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.15e-33], t, If[LessEqual[y, 1.55e+54], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-33}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+54}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.14999999999999993e-33 or 1.55e54 < y Initial program 99.9%
associate-*l/71.5%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in y around inf 60.3%
if -1.14999999999999993e-33 < y < 1.55e54Initial program 95.1%
associate-*l/95.2%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in y around 0 64.6%
*-commutative64.6%
associate-/l*64.7%
Simplified64.7%
Final simplification62.6%
(FPCore (x y z t) :precision binary64 (* t (/ (- x y) (- z y))))
double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t * ((x - y) / (z - y))
end function
public static double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - y));
}
def code(x, y, z, t): return t * ((x - y) / (z - y))
function code(x, y, z, t) return Float64(t * Float64(Float64(x - y) / Float64(z - y))) end
function tmp = code(x, y, z, t) tmp = t * ((x - y) / (z - y)); end
code[x_, y_, z_, t_] := N[(t * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x - y}{z - y}
\end{array}
Initial program 97.5%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.5%
associate-*l/83.5%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in y around inf 35.2%
Final simplification35.2%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024067
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))