
(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 16 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 (* (/ (- 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}
Initial program 96.7%
Final simplification96.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -4.4e+136)
t_1
(if (<= y -1.05e+79)
(* t (/ y (- z)))
(if (<= y -600000000.0)
t_1
(if (<= y -7e-41)
(/ (* x t) z)
(if (or (<= y -3.85e-90) (not (<= y 9.5e-96)))
t_1
(* x (/ t z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -4.4e+136) {
tmp = t_1;
} else if (y <= -1.05e+79) {
tmp = t * (y / -z);
} else if (y <= -600000000.0) {
tmp = t_1;
} else if (y <= -7e-41) {
tmp = (x * t) / z;
} else if ((y <= -3.85e-90) || !(y <= 9.5e-96)) {
tmp = t_1;
} else {
tmp = x * (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) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (y <= (-4.4d+136)) then
tmp = t_1
else if (y <= (-1.05d+79)) then
tmp = t * (y / -z)
else if (y <= (-600000000.0d0)) then
tmp = t_1
else if (y <= (-7d-41)) then
tmp = (x * t) / z
else if ((y <= (-3.85d-90)) .or. (.not. (y <= 9.5d-96))) then
tmp = t_1
else
tmp = x * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -4.4e+136) {
tmp = t_1;
} else if (y <= -1.05e+79) {
tmp = t * (y / -z);
} else if (y <= -600000000.0) {
tmp = t_1;
} else if (y <= -7e-41) {
tmp = (x * t) / z;
} else if ((y <= -3.85e-90) || !(y <= 9.5e-96)) {
tmp = t_1;
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -4.4e+136: tmp = t_1 elif y <= -1.05e+79: tmp = t * (y / -z) elif y <= -600000000.0: tmp = t_1 elif y <= -7e-41: tmp = (x * t) / z elif (y <= -3.85e-90) or not (y <= 9.5e-96): tmp = t_1 else: tmp = x * (t / z) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -4.4e+136) tmp = t_1; elseif (y <= -1.05e+79) tmp = Float64(t * Float64(y / Float64(-z))); elseif (y <= -600000000.0) tmp = t_1; elseif (y <= -7e-41) tmp = Float64(Float64(x * t) / z); elseif ((y <= -3.85e-90) || !(y <= 9.5e-96)) tmp = t_1; else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -4.4e+136) tmp = t_1; elseif (y <= -1.05e+79) tmp = t * (y / -z); elseif (y <= -600000000.0) tmp = t_1; elseif (y <= -7e-41) tmp = (x * t) / z; elseif ((y <= -3.85e-90) || ~((y <= 9.5e-96))) tmp = t_1; else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e+136], t$95$1, If[LessEqual[y, -1.05e+79], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -600000000.0], t$95$1, If[LessEqual[y, -7e-41], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, -3.85e-90], N[Not[LessEqual[y, 9.5e-96]], $MachinePrecision]], t$95$1, N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{+79}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;y \leq -600000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-41}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq -3.85 \cdot 10^{-90} \lor \neg \left(y \leq 9.5 \cdot 10^{-96}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -4.3999999999999999e136 or -1.05000000000000004e79 < y < -6e8 or -6.9999999999999999e-41 < y < -3.84999999999999986e-90 or 9.4999999999999993e-96 < y Initial program 98.5%
associate-*l/80.8%
sub-neg80.8%
+-commutative80.8%
neg-sub080.8%
associate-+l-80.8%
neg-sub080.8%
distribute-neg-frac280.8%
distribute-frac-neg80.8%
distribute-lft-neg-in80.8%
sub-neg80.8%
distribute-neg-in80.8%
remove-double-neg80.8%
+-commutative80.8%
sub-neg80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in z around 0 60.6%
associate-/l*72.6%
div-sub72.6%
*-inverses72.6%
Simplified72.6%
if -4.3999999999999999e136 < y < -1.05000000000000004e79Initial program 99.8%
associate-*l/84.8%
sub-neg84.8%
+-commutative84.8%
neg-sub084.8%
associate-+l-84.8%
neg-sub084.8%
distribute-neg-frac284.8%
distribute-frac-neg84.8%
distribute-lft-neg-in84.8%
sub-neg84.8%
distribute-neg-in84.8%
remove-double-neg84.8%
+-commutative84.8%
sub-neg84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in x around 0 77.2%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around 0 58.4%
mul-1-neg58.4%
associate-/l*73.2%
distribute-rgt-neg-in73.2%
distribute-neg-frac273.2%
Simplified73.2%
if -6e8 < y < -6.9999999999999999e-41Initial program 99.8%
associate-*l/100.0%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in y around 0 73.6%
if -3.84999999999999986e-90 < y < 9.4999999999999993e-96Initial program 93.2%
associate-*l/91.6%
associate-/l*90.5%
Simplified90.5%
associate-*r/91.6%
associate-*l/93.2%
*-commutative93.2%
clear-num92.6%
un-div-inv92.6%
Applied egg-rr92.6%
Taylor expanded in x around inf 80.2%
associate-*l/82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in z around inf 72.9%
Final simplification72.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -9e+95)
t_2
(if (<= x 3.7e-56)
t_1
(if (<= x 8e+30)
t_2
(if (<= x 1.35e+91)
t_1
(if (or (<= x 3.9e+160) (not (<= x 1.02e+232)))
t_2
(* t (- 1.0 (/ x y))))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -9e+95) {
tmp = t_2;
} else if (x <= 3.7e-56) {
tmp = t_1;
} else if (x <= 8e+30) {
tmp = t_2;
} else if (x <= 1.35e+91) {
tmp = t_1;
} else if ((x <= 3.9e+160) || !(x <= 1.02e+232)) {
tmp = t_2;
} else {
tmp = t * (1.0 - (x / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-9d+95)) then
tmp = t_2
else if (x <= 3.7d-56) then
tmp = t_1
else if (x <= 8d+30) then
tmp = t_2
else if (x <= 1.35d+91) then
tmp = t_1
else if ((x <= 3.9d+160) .or. (.not. (x <= 1.02d+232))) then
tmp = t_2
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -9e+95) {
tmp = t_2;
} else if (x <= 3.7e-56) {
tmp = t_1;
} else if (x <= 8e+30) {
tmp = t_2;
} else if (x <= 1.35e+91) {
tmp = t_1;
} else if ((x <= 3.9e+160) || !(x <= 1.02e+232)) {
tmp = t_2;
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -9e+95: tmp = t_2 elif x <= 3.7e-56: tmp = t_1 elif x <= 8e+30: tmp = t_2 elif x <= 1.35e+91: tmp = t_1 elif (x <= 3.9e+160) or not (x <= 1.02e+232): tmp = t_2 else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -9e+95) tmp = t_2; elseif (x <= 3.7e-56) tmp = t_1; elseif (x <= 8e+30) tmp = t_2; elseif (x <= 1.35e+91) tmp = t_1; elseif ((x <= 3.9e+160) || !(x <= 1.02e+232)) tmp = t_2; else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -9e+95) tmp = t_2; elseif (x <= 3.7e-56) tmp = t_1; elseif (x <= 8e+30) tmp = t_2; elseif (x <= 1.35e+91) tmp = t_1; elseif ((x <= 3.9e+160) || ~((x <= 1.02e+232))) tmp = t_2; else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9e+95], t$95$2, If[LessEqual[x, 3.7e-56], t$95$1, If[LessEqual[x, 8e+30], t$95$2, If[LessEqual[x, 1.35e+91], t$95$1, If[Or[LessEqual[x, 3.9e+160], N[Not[LessEqual[x, 1.02e+232]], $MachinePrecision]], t$95$2, N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -9 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+160} \lor \neg \left(x \leq 1.02 \cdot 10^{+232}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if x < -9.00000000000000033e95 or 3.7000000000000002e-56 < x < 8.0000000000000002e30 or 1.35e91 < x < 3.90000000000000007e160 or 1.0199999999999999e232 < x Initial program 96.7%
Taylor expanded in x around inf 84.7%
if -9.00000000000000033e95 < x < 3.7000000000000002e-56 or 8.0000000000000002e30 < x < 1.35e91Initial program 96.4%
associate-*l/87.0%
sub-neg87.0%
+-commutative87.0%
neg-sub087.0%
associate-+l-87.0%
neg-sub087.0%
distribute-neg-frac287.0%
distribute-frac-neg87.0%
distribute-lft-neg-in87.0%
sub-neg87.0%
distribute-neg-in87.0%
remove-double-neg87.0%
+-commutative87.0%
sub-neg87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in x around 0 73.5%
associate-/l*85.4%
Simplified85.4%
if 3.90000000000000007e160 < x < 1.0199999999999999e232Initial program 99.9%
associate-*l/85.8%
sub-neg85.8%
+-commutative85.8%
neg-sub085.8%
associate-+l-85.8%
neg-sub085.8%
distribute-neg-frac285.8%
distribute-frac-neg85.8%
distribute-lft-neg-in85.8%
sub-neg85.8%
distribute-neg-in85.8%
remove-double-neg85.8%
+-commutative85.8%
sub-neg85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around 0 71.3%
associate-/l*76.9%
div-sub76.9%
*-inverses76.9%
Simplified76.9%
Final simplification84.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -2.4e+95)
t_2
(if (<= x 5.2e-56)
t_1
(if (<= x 6.5e+31)
t_2
(if (<= x 2.75e+91)
t_1
(if (or (<= x 4e+160) (not (<= x 9.8e+231)))
t_2
(- t (* t (/ x y))))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2.4e+95) {
tmp = t_2;
} else if (x <= 5.2e-56) {
tmp = t_1;
} else if (x <= 6.5e+31) {
tmp = t_2;
} else if (x <= 2.75e+91) {
tmp = t_1;
} else if ((x <= 4e+160) || !(x <= 9.8e+231)) {
tmp = t_2;
} else {
tmp = t - (t * (x / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-2.4d+95)) then
tmp = t_2
else if (x <= 5.2d-56) then
tmp = t_1
else if (x <= 6.5d+31) then
tmp = t_2
else if (x <= 2.75d+91) then
tmp = t_1
else if ((x <= 4d+160) .or. (.not. (x <= 9.8d+231))) then
tmp = t_2
else
tmp = t - (t * (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2.4e+95) {
tmp = t_2;
} else if (x <= 5.2e-56) {
tmp = t_1;
} else if (x <= 6.5e+31) {
tmp = t_2;
} else if (x <= 2.75e+91) {
tmp = t_1;
} else if ((x <= 4e+160) || !(x <= 9.8e+231)) {
tmp = t_2;
} else {
tmp = t - (t * (x / y));
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -2.4e+95: tmp = t_2 elif x <= 5.2e-56: tmp = t_1 elif x <= 6.5e+31: tmp = t_2 elif x <= 2.75e+91: tmp = t_1 elif (x <= 4e+160) or not (x <= 9.8e+231): tmp = t_2 else: tmp = t - (t * (x / y)) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -2.4e+95) tmp = t_2; elseif (x <= 5.2e-56) tmp = t_1; elseif (x <= 6.5e+31) tmp = t_2; elseif (x <= 2.75e+91) tmp = t_1; elseif ((x <= 4e+160) || !(x <= 9.8e+231)) tmp = t_2; else tmp = Float64(t - Float64(t * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -2.4e+95) tmp = t_2; elseif (x <= 5.2e-56) tmp = t_1; elseif (x <= 6.5e+31) tmp = t_2; elseif (x <= 2.75e+91) tmp = t_1; elseif ((x <= 4e+160) || ~((x <= 9.8e+231))) tmp = t_2; else tmp = t - (t * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+95], t$95$2, If[LessEqual[x, 5.2e-56], t$95$1, If[LessEqual[x, 6.5e+31], t$95$2, If[LessEqual[x, 2.75e+91], t$95$1, If[Or[LessEqual[x, 4e+160], N[Not[LessEqual[x, 9.8e+231]], $MachinePrecision]], t$95$2, N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -2.4 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+160} \lor \neg \left(x \leq 9.8 \cdot 10^{+231}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\end{array}
\end{array}
if x < -2.4e95 or 5.19999999999999994e-56 < x < 6.5000000000000004e31 or 2.7499999999999999e91 < x < 4.00000000000000003e160 or 9.80000000000000042e231 < x Initial program 96.7%
Taylor expanded in x around inf 84.7%
if -2.4e95 < x < 5.19999999999999994e-56 or 6.5000000000000004e31 < x < 2.7499999999999999e91Initial program 96.4%
associate-*l/87.0%
sub-neg87.0%
+-commutative87.0%
neg-sub087.0%
associate-+l-87.0%
neg-sub087.0%
distribute-neg-frac287.0%
distribute-frac-neg87.0%
distribute-lft-neg-in87.0%
sub-neg87.0%
distribute-neg-in87.0%
remove-double-neg87.0%
+-commutative87.0%
sub-neg87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in x around 0 73.5%
associate-/l*85.4%
Simplified85.4%
if 4.00000000000000003e160 < x < 9.80000000000000042e231Initial program 99.9%
associate-*l/85.8%
sub-neg85.8%
+-commutative85.8%
neg-sub085.8%
associate-+l-85.8%
neg-sub085.8%
distribute-neg-frac285.8%
distribute-frac-neg85.8%
distribute-lft-neg-in85.8%
sub-neg85.8%
distribute-neg-in85.8%
remove-double-neg85.8%
+-commutative85.8%
sub-neg85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around 0 71.3%
Taylor expanded in y around 0 71.3%
mul-1-neg71.3%
unsub-neg71.3%
associate-/l*77.0%
Simplified77.0%
Final simplification84.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* x (/ t (- z y)))))
(if (<= x -5.1e+95)
t_2
(if (<= x 1e-53)
t_1
(if (<= x 3.8e+31)
t_2
(if (<= x 1.45e+91)
t_1
(if (<= x 3.9e+160)
(* t (/ x z))
(if (<= x 1.6e+237) (* t (- 1.0 (/ x y))) t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = x * (t / (z - y));
double tmp;
if (x <= -5.1e+95) {
tmp = t_2;
} else if (x <= 1e-53) {
tmp = t_1;
} else if (x <= 3.8e+31) {
tmp = t_2;
} else if (x <= 1.45e+91) {
tmp = t_1;
} else if (x <= 3.9e+160) {
tmp = t * (x / z);
} else if (x <= 1.6e+237) {
tmp = t * (1.0 - (x / y));
} 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) :: tmp
t_1 = t * (y / (y - z))
t_2 = x * (t / (z - y))
if (x <= (-5.1d+95)) then
tmp = t_2
else if (x <= 1d-53) then
tmp = t_1
else if (x <= 3.8d+31) then
tmp = t_2
else if (x <= 1.45d+91) then
tmp = t_1
else if (x <= 3.9d+160) then
tmp = t * (x / z)
else if (x <= 1.6d+237) then
tmp = t * (1.0d0 - (x / y))
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 * (y / (y - z));
double t_2 = x * (t / (z - y));
double tmp;
if (x <= -5.1e+95) {
tmp = t_2;
} else if (x <= 1e-53) {
tmp = t_1;
} else if (x <= 3.8e+31) {
tmp = t_2;
} else if (x <= 1.45e+91) {
tmp = t_1;
} else if (x <= 3.9e+160) {
tmp = t * (x / z);
} else if (x <= 1.6e+237) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = x * (t / (z - y)) tmp = 0 if x <= -5.1e+95: tmp = t_2 elif x <= 1e-53: tmp = t_1 elif x <= 3.8e+31: tmp = t_2 elif x <= 1.45e+91: tmp = t_1 elif x <= 3.9e+160: tmp = t * (x / z) elif x <= 1.6e+237: tmp = t * (1.0 - (x / y)) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(x * Float64(t / Float64(z - y))) tmp = 0.0 if (x <= -5.1e+95) tmp = t_2; elseif (x <= 1e-53) tmp = t_1; elseif (x <= 3.8e+31) tmp = t_2; elseif (x <= 1.45e+91) tmp = t_1; elseif (x <= 3.9e+160) tmp = Float64(t * Float64(x / z)); elseif (x <= 1.6e+237) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = x * (t / (z - y)); tmp = 0.0; if (x <= -5.1e+95) tmp = t_2; elseif (x <= 1e-53) tmp = t_1; elseif (x <= 3.8e+31) tmp = t_2; elseif (x <= 1.45e+91) tmp = t_1; elseif (x <= 3.9e+160) tmp = t * (x / z); elseif (x <= 1.6e+237) tmp = t * (1.0 - (x / y)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.1e+95], t$95$2, If[LessEqual[x, 1e-53], t$95$1, If[LessEqual[x, 3.8e+31], t$95$2, If[LessEqual[x, 1.45e+91], t$95$1, If[LessEqual[x, 3.9e+160], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+237], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;x \leq -5.1 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+160}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+237}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -5.10000000000000003e95 or 1.00000000000000003e-53 < x < 3.8000000000000001e31 or 1.60000000000000009e237 < x Initial program 96.0%
associate-*l/82.7%
associate-/l*92.2%
Simplified92.2%
associate-*r/82.7%
associate-*l/96.0%
*-commutative96.0%
clear-num95.8%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in x around inf 73.8%
associate-*l/83.3%
*-commutative83.3%
Simplified83.3%
if -5.10000000000000003e95 < x < 1.00000000000000003e-53 or 3.8000000000000001e31 < x < 1.45000000000000007e91Initial program 96.4%
associate-*l/87.0%
sub-neg87.0%
+-commutative87.0%
neg-sub087.0%
associate-+l-87.0%
neg-sub087.0%
distribute-neg-frac287.0%
distribute-frac-neg87.0%
distribute-lft-neg-in87.0%
sub-neg87.0%
distribute-neg-in87.0%
remove-double-neg87.0%
+-commutative87.0%
sub-neg87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in x around 0 73.5%
associate-/l*85.4%
Simplified85.4%
if 1.45000000000000007e91 < x < 3.90000000000000007e160Initial program 99.8%
Taylor expanded in y around 0 69.4%
if 3.90000000000000007e160 < x < 1.60000000000000009e237Initial program 99.9%
associate-*l/85.8%
sub-neg85.8%
+-commutative85.8%
neg-sub085.8%
associate-+l-85.8%
neg-sub085.8%
distribute-neg-frac285.8%
distribute-frac-neg85.8%
distribute-lft-neg-in85.8%
sub-neg85.8%
distribute-neg-in85.8%
remove-double-neg85.8%
+-commutative85.8%
sub-neg85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around 0 71.3%
associate-/l*76.9%
div-sub76.9%
*-inverses76.9%
Simplified76.9%
Final simplification83.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z))))
(t_2 (* t (/ x (- z y))))
(t_3 (/ t (/ (- z y) x))))
(if (<= x -3.3e+94)
t_3
(if (<= x 1e-53)
t_1
(if (<= x 5.8e+29)
t_2
(if (<= x 4.8e+91)
t_1
(if (<= x 4.2e+160)
t_2
(if (<= x 9.8e+231) (- t (* t (/ x y))) t_3))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double t_3 = t / ((z - y) / x);
double tmp;
if (x <= -3.3e+94) {
tmp = t_3;
} else if (x <= 1e-53) {
tmp = t_1;
} else if (x <= 5.8e+29) {
tmp = t_2;
} else if (x <= 4.8e+91) {
tmp = t_1;
} else if (x <= 4.2e+160) {
tmp = t_2;
} else if (x <= 9.8e+231) {
tmp = t - (t * (x / y));
} 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 * (y / (y - z))
t_2 = t * (x / (z - y))
t_3 = t / ((z - y) / x)
if (x <= (-3.3d+94)) then
tmp = t_3
else if (x <= 1d-53) then
tmp = t_1
else if (x <= 5.8d+29) then
tmp = t_2
else if (x <= 4.8d+91) then
tmp = t_1
else if (x <= 4.2d+160) then
tmp = t_2
else if (x <= 9.8d+231) then
tmp = t - (t * (x / y))
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 * (y / (y - z));
double t_2 = t * (x / (z - y));
double t_3 = t / ((z - y) / x);
double tmp;
if (x <= -3.3e+94) {
tmp = t_3;
} else if (x <= 1e-53) {
tmp = t_1;
} else if (x <= 5.8e+29) {
tmp = t_2;
} else if (x <= 4.8e+91) {
tmp = t_1;
} else if (x <= 4.2e+160) {
tmp = t_2;
} else if (x <= 9.8e+231) {
tmp = t - (t * (x / y));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) t_3 = t / ((z - y) / x) tmp = 0 if x <= -3.3e+94: tmp = t_3 elif x <= 1e-53: tmp = t_1 elif x <= 5.8e+29: tmp = t_2 elif x <= 4.8e+91: tmp = t_1 elif x <= 4.2e+160: tmp = t_2 elif x <= 9.8e+231: tmp = t - (t * (x / y)) else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) t_3 = Float64(t / Float64(Float64(z - y) / x)) tmp = 0.0 if (x <= -3.3e+94) tmp = t_3; elseif (x <= 1e-53) tmp = t_1; elseif (x <= 5.8e+29) tmp = t_2; elseif (x <= 4.8e+91) tmp = t_1; elseif (x <= 4.2e+160) tmp = t_2; elseif (x <= 9.8e+231) tmp = Float64(t - Float64(t * Float64(x / y))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); t_3 = t / ((z - y) / x); tmp = 0.0; if (x <= -3.3e+94) tmp = t_3; elseif (x <= 1e-53) tmp = t_1; elseif (x <= 5.8e+29) tmp = t_2; elseif (x <= 4.8e+91) tmp = t_1; elseif (x <= 4.2e+160) tmp = t_2; elseif (x <= 9.8e+231) tmp = t - (t * (x / y)); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $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[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.3e+94], t$95$3, If[LessEqual[x, 1e-53], t$95$1, If[LessEqual[x, 5.8e+29], t$95$2, If[LessEqual[x, 4.8e+91], t$95$1, If[LessEqual[x, 4.2e+160], t$95$2, If[LessEqual[x, 9.8e+231], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
t_3 := \frac{t}{\frac{z - y}{x}}\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+94}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+231}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -3.3e94 or 9.80000000000000042e231 < x Initial program 94.8%
associate-*l/77.9%
associate-/l*90.0%
Simplified90.0%
associate-*r/77.9%
associate-*l/94.8%
*-commutative94.8%
clear-num94.7%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in x around inf 85.6%
if -3.3e94 < x < 1.00000000000000003e-53 or 5.7999999999999999e29 < x < 4.79999999999999966e91Initial program 96.4%
associate-*l/87.0%
sub-neg87.0%
+-commutative87.0%
neg-sub087.0%
associate-+l-87.0%
neg-sub087.0%
distribute-neg-frac287.0%
distribute-frac-neg87.0%
distribute-lft-neg-in87.0%
sub-neg87.0%
distribute-neg-in87.0%
remove-double-neg87.0%
+-commutative87.0%
sub-neg87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in x around 0 73.5%
associate-/l*85.4%
Simplified85.4%
if 1.00000000000000003e-53 < x < 5.7999999999999999e29 or 4.79999999999999966e91 < x < 4.19999999999999993e160Initial program 99.8%
Taylor expanded in x around inf 84.7%
if 4.19999999999999993e160 < x < 9.80000000000000042e231Initial program 99.9%
associate-*l/85.8%
sub-neg85.8%
+-commutative85.8%
neg-sub085.8%
associate-+l-85.8%
neg-sub085.8%
distribute-neg-frac285.8%
distribute-frac-neg85.8%
distribute-lft-neg-in85.8%
sub-neg85.8%
distribute-neg-in85.8%
remove-double-neg85.8%
+-commutative85.8%
sub-neg85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around 0 71.3%
Taylor expanded in y around 0 71.3%
mul-1-neg71.3%
unsub-neg71.3%
associate-/l*77.0%
Simplified77.0%
Final simplification84.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- z)))))
(if (<= y -3e+136)
t
(if (<= y -1.3e+77)
t_1
(if (<= y -1.38e+14)
t
(if (<= y -3.3e-43)
(/ (* x t) z)
(if (<= y -1.8e-107) t_1 (if (<= y 4.2) (* t (/ x z)) t))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / -z);
double tmp;
if (y <= -3e+136) {
tmp = t;
} else if (y <= -1.3e+77) {
tmp = t_1;
} else if (y <= -1.38e+14) {
tmp = t;
} else if (y <= -3.3e-43) {
tmp = (x * t) / z;
} else if (y <= -1.8e-107) {
tmp = t_1;
} else if (y <= 4.2) {
tmp = t * (x / 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) :: t_1
real(8) :: tmp
t_1 = t * (y / -z)
if (y <= (-3d+136)) then
tmp = t
else if (y <= (-1.3d+77)) then
tmp = t_1
else if (y <= (-1.38d+14)) then
tmp = t
else if (y <= (-3.3d-43)) then
tmp = (x * t) / z
else if (y <= (-1.8d-107)) then
tmp = t_1
else if (y <= 4.2d0) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (y / -z);
double tmp;
if (y <= -3e+136) {
tmp = t;
} else if (y <= -1.3e+77) {
tmp = t_1;
} else if (y <= -1.38e+14) {
tmp = t;
} else if (y <= -3.3e-43) {
tmp = (x * t) / z;
} else if (y <= -1.8e-107) {
tmp = t_1;
} else if (y <= 4.2) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / -z) tmp = 0 if y <= -3e+136: tmp = t elif y <= -1.3e+77: tmp = t_1 elif y <= -1.38e+14: tmp = t elif y <= -3.3e-43: tmp = (x * t) / z elif y <= -1.8e-107: tmp = t_1 elif y <= 4.2: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(-z))) tmp = 0.0 if (y <= -3e+136) tmp = t; elseif (y <= -1.3e+77) tmp = t_1; elseif (y <= -1.38e+14) tmp = t; elseif (y <= -3.3e-43) tmp = Float64(Float64(x * t) / z); elseif (y <= -1.8e-107) tmp = t_1; elseif (y <= 4.2) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / -z); tmp = 0.0; if (y <= -3e+136) tmp = t; elseif (y <= -1.3e+77) tmp = t_1; elseif (y <= -1.38e+14) tmp = t; elseif (y <= -3.3e-43) tmp = (x * t) / z; elseif (y <= -1.8e-107) tmp = t_1; elseif (y <= 4.2) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+136], t, If[LessEqual[y, -1.3e+77], t$95$1, If[LessEqual[y, -1.38e+14], t, If[LessEqual[y, -3.3e-43], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -1.8e-107], t$95$1, If[LessEqual[y, 4.2], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{-z}\\
\mathbf{if}\;y \leq -3 \cdot 10^{+136}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.38 \cdot 10^{+14}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.99999999999999979e136 or -1.3000000000000001e77 < y < -1.38e14 or 4.20000000000000018 < y Initial program 99.8%
associate-*l/77.1%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in y around inf 62.9%
if -2.99999999999999979e136 < y < -1.3000000000000001e77 or -3.30000000000000016e-43 < y < -1.79999999999999988e-107Initial program 96.5%
associate-*l/93.0%
sub-neg93.0%
+-commutative93.0%
neg-sub093.0%
associate-+l-93.0%
neg-sub093.0%
distribute-neg-frac293.0%
distribute-frac-neg93.0%
distribute-lft-neg-in93.0%
sub-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
+-commutative93.0%
sub-neg93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in x around 0 63.0%
associate-/l*69.7%
Simplified69.7%
Taylor expanded in y around 0 46.7%
mul-1-neg46.7%
associate-/l*53.3%
distribute-rgt-neg-in53.3%
distribute-neg-frac253.3%
Simplified53.3%
if -1.38e14 < y < -3.30000000000000016e-43Initial program 99.9%
associate-*l/99.9%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 62.5%
if -1.79999999999999988e-107 < y < 4.20000000000000018Initial program 93.1%
Taylor expanded in y around 0 68.9%
Final simplification64.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.2e+136)
t
(if (<= y -6.8e+69)
(* t (/ y (- z)))
(if (<= y -300000000000.0)
t
(if (<= y -3e-43)
(/ (* x t) z)
(if (<= y -6.7e-90)
(* t (/ (- x) y))
(if (<= y 4.8) (* t (/ x z)) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+136) {
tmp = t;
} else if (y <= -6.8e+69) {
tmp = t * (y / -z);
} else if (y <= -300000000000.0) {
tmp = t;
} else if (y <= -3e-43) {
tmp = (x * t) / z;
} else if (y <= -6.7e-90) {
tmp = t * (-x / y);
} else if (y <= 4.8) {
tmp = t * (x / 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 <= (-4.2d+136)) then
tmp = t
else if (y <= (-6.8d+69)) then
tmp = t * (y / -z)
else if (y <= (-300000000000.0d0)) then
tmp = t
else if (y <= (-3d-43)) then
tmp = (x * t) / z
else if (y <= (-6.7d-90)) then
tmp = t * (-x / y)
else if (y <= 4.8d0) then
tmp = t * (x / 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 <= -4.2e+136) {
tmp = t;
} else if (y <= -6.8e+69) {
tmp = t * (y / -z);
} else if (y <= -300000000000.0) {
tmp = t;
} else if (y <= -3e-43) {
tmp = (x * t) / z;
} else if (y <= -6.7e-90) {
tmp = t * (-x / y);
} else if (y <= 4.8) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.2e+136: tmp = t elif y <= -6.8e+69: tmp = t * (y / -z) elif y <= -300000000000.0: tmp = t elif y <= -3e-43: tmp = (x * t) / z elif y <= -6.7e-90: tmp = t * (-x / y) elif y <= 4.8: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e+136) tmp = t; elseif (y <= -6.8e+69) tmp = Float64(t * Float64(y / Float64(-z))); elseif (y <= -300000000000.0) tmp = t; elseif (y <= -3e-43) tmp = Float64(Float64(x * t) / z); elseif (y <= -6.7e-90) tmp = Float64(t * Float64(Float64(-x) / y)); elseif (y <= 4.8) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.2e+136) tmp = t; elseif (y <= -6.8e+69) tmp = t * (y / -z); elseif (y <= -300000000000.0) tmp = t; elseif (y <= -3e-43) tmp = (x * t) / z; elseif (y <= -6.7e-90) tmp = t * (-x / y); elseif (y <= 4.8) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+136], t, If[LessEqual[y, -6.8e+69], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -300000000000.0], t, If[LessEqual[y, -3e-43], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -6.7e-90], N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+136}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;y \leq -300000000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq -6.7 \cdot 10^{-90}:\\
\;\;\;\;t \cdot \frac{-x}{y}\\
\mathbf{elif}\;y \leq 4.8:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.1999999999999998e136 or -6.79999999999999973e69 < y < -3e11 or 4.79999999999999982 < y Initial program 99.8%
associate-*l/77.1%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in y around inf 62.9%
if -4.1999999999999998e136 < y < -6.79999999999999973e69Initial program 99.8%
associate-*l/84.8%
sub-neg84.8%
+-commutative84.8%
neg-sub084.8%
associate-+l-84.8%
neg-sub084.8%
distribute-neg-frac284.8%
distribute-frac-neg84.8%
distribute-lft-neg-in84.8%
sub-neg84.8%
distribute-neg-in84.8%
remove-double-neg84.8%
+-commutative84.8%
sub-neg84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in x around 0 77.2%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around 0 58.4%
mul-1-neg58.4%
associate-/l*73.2%
distribute-rgt-neg-in73.2%
distribute-neg-frac273.2%
Simplified73.2%
if -3e11 < y < -3.00000000000000003e-43Initial program 99.9%
associate-*l/99.9%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 62.5%
if -3.00000000000000003e-43 < y < -6.7000000000000004e-90Initial program 91.9%
associate-*l/99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
neg-sub099.6%
distribute-neg-frac299.6%
distribute-frac-neg99.6%
distribute-lft-neg-in99.6%
sub-neg99.6%
distribute-neg-in99.6%
remove-double-neg99.6%
+-commutative99.6%
sub-neg99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 75.9%
Taylor expanded in y around 0 59.9%
mul-1-neg59.9%
associate-/l*52.3%
distribute-rgt-neg-in52.3%
distribute-frac-neg52.3%
Simplified52.3%
if -6.7000000000000004e-90 < y < 4.79999999999999982Initial program 93.3%
Taylor expanded in y around 0 68.2%
Final simplification65.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.6e+136)
t
(if (<= y -7e+71)
(* t (/ y (- z)))
(if (<= y -16500000000.0)
t
(if (<= y -3.1e-43)
(/ (* x t) z)
(if (<= y -6.7e-90)
(* x (/ t (- y)))
(if (<= y 2.55) (* t (/ x z)) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+136) {
tmp = t;
} else if (y <= -7e+71) {
tmp = t * (y / -z);
} else if (y <= -16500000000.0) {
tmp = t;
} else if (y <= -3.1e-43) {
tmp = (x * t) / z;
} else if (y <= -6.7e-90) {
tmp = x * (t / -y);
} else if (y <= 2.55) {
tmp = t * (x / 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 <= (-7.6d+136)) then
tmp = t
else if (y <= (-7d+71)) then
tmp = t * (y / -z)
else if (y <= (-16500000000.0d0)) then
tmp = t
else if (y <= (-3.1d-43)) then
tmp = (x * t) / z
else if (y <= (-6.7d-90)) then
tmp = x * (t / -y)
else if (y <= 2.55d0) then
tmp = t * (x / 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 <= -7.6e+136) {
tmp = t;
} else if (y <= -7e+71) {
tmp = t * (y / -z);
} else if (y <= -16500000000.0) {
tmp = t;
} else if (y <= -3.1e-43) {
tmp = (x * t) / z;
} else if (y <= -6.7e-90) {
tmp = x * (t / -y);
} else if (y <= 2.55) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.6e+136: tmp = t elif y <= -7e+71: tmp = t * (y / -z) elif y <= -16500000000.0: tmp = t elif y <= -3.1e-43: tmp = (x * t) / z elif y <= -6.7e-90: tmp = x * (t / -y) elif y <= 2.55: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.6e+136) tmp = t; elseif (y <= -7e+71) tmp = Float64(t * Float64(y / Float64(-z))); elseif (y <= -16500000000.0) tmp = t; elseif (y <= -3.1e-43) tmp = Float64(Float64(x * t) / z); elseif (y <= -6.7e-90) tmp = Float64(x * Float64(t / Float64(-y))); elseif (y <= 2.55) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.6e+136) tmp = t; elseif (y <= -7e+71) tmp = t * (y / -z); elseif (y <= -16500000000.0) tmp = t; elseif (y <= -3.1e-43) tmp = (x * t) / z; elseif (y <= -6.7e-90) tmp = x * (t / -y); elseif (y <= 2.55) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e+136], t, If[LessEqual[y, -7e+71], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -16500000000.0], t, If[LessEqual[y, -3.1e-43], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -6.7e-90], N[(x * N[(t / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.55], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+136}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -7 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;y \leq -16500000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq -6.7 \cdot 10^{-90}:\\
\;\;\;\;x \cdot \frac{t}{-y}\\
\mathbf{elif}\;y \leq 2.55:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.60000000000000029e136 or -6.9999999999999998e71 < y < -1.65e10 or 2.5499999999999998 < y Initial program 99.8%
associate-*l/77.1%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in y around inf 62.9%
if -7.60000000000000029e136 < y < -6.9999999999999998e71Initial program 99.8%
associate-*l/84.8%
sub-neg84.8%
+-commutative84.8%
neg-sub084.8%
associate-+l-84.8%
neg-sub084.8%
distribute-neg-frac284.8%
distribute-frac-neg84.8%
distribute-lft-neg-in84.8%
sub-neg84.8%
distribute-neg-in84.8%
remove-double-neg84.8%
+-commutative84.8%
sub-neg84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in x around 0 77.2%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around 0 58.4%
mul-1-neg58.4%
associate-/l*73.2%
distribute-rgt-neg-in73.2%
distribute-neg-frac273.2%
Simplified73.2%
if -1.65e10 < y < -3.0999999999999999e-43Initial program 99.9%
associate-*l/99.9%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 62.5%
if -3.0999999999999999e-43 < y < -6.7000000000000004e-90Initial program 91.9%
associate-*l/99.6%
associate-/l*99.3%
Simplified99.3%
associate-*r/99.6%
associate-*l/91.9%
*-commutative91.9%
clear-num91.6%
un-div-inv91.5%
Applied egg-rr91.5%
Taylor expanded in x around inf 60.6%
associate-*l/60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in z around 0 59.8%
mul-1-neg59.8%
distribute-neg-frac259.8%
Simplified59.8%
if -6.7000000000000004e-90 < y < 2.5499999999999998Initial program 93.3%
Taylor expanded in y around 0 68.2%
Final simplification65.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.9e+140)
t
(if (<= y -1.95e+71)
(* t (/ y (- z)))
(if (<= y -5.3e+14)
t
(if (<= y -3.3e-43)
(/ (* x t) z)
(if (<= y -6.5e-90)
(/ (* x t) (- y))
(if (<= y 4.8) (* t (/ x z)) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e+140) {
tmp = t;
} else if (y <= -1.95e+71) {
tmp = t * (y / -z);
} else if (y <= -5.3e+14) {
tmp = t;
} else if (y <= -3.3e-43) {
tmp = (x * t) / z;
} else if (y <= -6.5e-90) {
tmp = (x * t) / -y;
} else if (y <= 4.8) {
tmp = t * (x / 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.9d+140)) then
tmp = t
else if (y <= (-1.95d+71)) then
tmp = t * (y / -z)
else if (y <= (-5.3d+14)) then
tmp = t
else if (y <= (-3.3d-43)) then
tmp = (x * t) / z
else if (y <= (-6.5d-90)) then
tmp = (x * t) / -y
else if (y <= 4.8d0) then
tmp = t * (x / 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.9e+140) {
tmp = t;
} else if (y <= -1.95e+71) {
tmp = t * (y / -z);
} else if (y <= -5.3e+14) {
tmp = t;
} else if (y <= -3.3e-43) {
tmp = (x * t) / z;
} else if (y <= -6.5e-90) {
tmp = (x * t) / -y;
} else if (y <= 4.8) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.9e+140: tmp = t elif y <= -1.95e+71: tmp = t * (y / -z) elif y <= -5.3e+14: tmp = t elif y <= -3.3e-43: tmp = (x * t) / z elif y <= -6.5e-90: tmp = (x * t) / -y elif y <= 4.8: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e+140) tmp = t; elseif (y <= -1.95e+71) tmp = Float64(t * Float64(y / Float64(-z))); elseif (y <= -5.3e+14) tmp = t; elseif (y <= -3.3e-43) tmp = Float64(Float64(x * t) / z); elseif (y <= -6.5e-90) tmp = Float64(Float64(x * t) / Float64(-y)); elseif (y <= 4.8) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.9e+140) tmp = t; elseif (y <= -1.95e+71) tmp = t * (y / -z); elseif (y <= -5.3e+14) tmp = t; elseif (y <= -3.3e-43) tmp = (x * t) / z; elseif (y <= -6.5e-90) tmp = (x * t) / -y; elseif (y <= 4.8) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.9e+140], t, If[LessEqual[y, -1.95e+71], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.3e+14], t, If[LessEqual[y, -3.3e-43], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -6.5e-90], N[(N[(x * t), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[y, 4.8], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+140}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;y \leq -5.3 \cdot 10^{+14}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-90}:\\
\;\;\;\;\frac{x \cdot t}{-y}\\
\mathbf{elif}\;y \leq 4.8:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.9e140 or -1.9500000000000001e71 < y < -5.3e14 or 4.79999999999999982 < y Initial program 99.8%
associate-*l/77.1%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in y around inf 62.9%
if -1.9e140 < y < -1.9500000000000001e71Initial program 99.8%
associate-*l/84.8%
sub-neg84.8%
+-commutative84.8%
neg-sub084.8%
associate-+l-84.8%
neg-sub084.8%
distribute-neg-frac284.8%
distribute-frac-neg84.8%
distribute-lft-neg-in84.8%
sub-neg84.8%
distribute-neg-in84.8%
remove-double-neg84.8%
+-commutative84.8%
sub-neg84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in x around 0 77.2%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around 0 58.4%
mul-1-neg58.4%
associate-/l*73.2%
distribute-rgt-neg-in73.2%
distribute-neg-frac273.2%
Simplified73.2%
if -5.3e14 < y < -3.30000000000000016e-43Initial program 99.9%
associate-*l/99.9%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 62.5%
if -3.30000000000000016e-43 < y < -6.4999999999999996e-90Initial program 91.9%
associate-*l/99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
neg-sub099.6%
distribute-neg-frac299.6%
distribute-frac-neg99.6%
distribute-lft-neg-in99.6%
sub-neg99.6%
distribute-neg-in99.6%
remove-double-neg99.6%
+-commutative99.6%
sub-neg99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 75.9%
Taylor expanded in y around 0 59.9%
associate-*r/59.9%
associate-*r*59.9%
neg-mul-159.9%
Simplified59.9%
if -6.4999999999999996e-90 < y < 4.79999999999999982Initial program 93.3%
Taylor expanded in y around 0 68.2%
Final simplification65.5%
(FPCore (x y z t) :precision binary64 (if (<= y -4.4e+220) (* t (- 1.0 (/ x y))) (if (<= y 2e+194) (* (- y x) (/ t (- y z))) (- t (* t (/ x y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.4e+220) {
tmp = t * (1.0 - (x / y));
} else if (y <= 2e+194) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t - (t * (x / 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.4d+220)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= 2d+194) then
tmp = (y - x) * (t / (y - z))
else
tmp = t - (t * (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.4e+220) {
tmp = t * (1.0 - (x / y));
} else if (y <= 2e+194) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t - (t * (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.4e+220: tmp = t * (1.0 - (x / y)) elif y <= 2e+194: tmp = (y - x) * (t / (y - z)) else: tmp = t - (t * (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.4e+220) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= 2e+194) tmp = Float64(Float64(y - x) * Float64(t / Float64(y - z))); else tmp = Float64(t - Float64(t * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.4e+220) tmp = t * (1.0 - (x / y)); elseif (y <= 2e+194) tmp = (y - x) * (t / (y - z)); else tmp = t - (t * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.4e+220], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+194], N[(N[(y - x), $MachinePrecision] * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+220}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+194}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -4.39999999999999978e220Initial program 99.9%
associate-*l/64.1%
sub-neg64.1%
+-commutative64.1%
neg-sub064.1%
associate-+l-64.1%
neg-sub064.1%
distribute-neg-frac264.1%
distribute-frac-neg64.1%
distribute-lft-neg-in64.1%
sub-neg64.1%
distribute-neg-in64.1%
remove-double-neg64.1%
+-commutative64.1%
sub-neg64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in z around 0 64.1%
associate-/l*96.5%
div-sub96.5%
*-inverses96.5%
Simplified96.5%
if -4.39999999999999978e220 < y < 1.99999999999999989e194Initial program 96.0%
associate-*l/89.8%
associate-/l*90.6%
Simplified90.6%
if 1.99999999999999989e194 < y Initial program 99.8%
associate-*l/70.4%
sub-neg70.4%
+-commutative70.4%
neg-sub070.4%
associate-+l-70.4%
neg-sub070.4%
distribute-neg-frac270.4%
distribute-frac-neg70.4%
distribute-lft-neg-in70.4%
sub-neg70.4%
distribute-neg-in70.4%
remove-double-neg70.4%
+-commutative70.4%
sub-neg70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in z around 0 63.9%
Taylor expanded in y around 0 83.6%
mul-1-neg83.6%
unsub-neg83.6%
associate-/l*90.5%
Simplified90.5%
Final simplification91.1%
(FPCore (x y z t) :precision binary64 (if (<= y -2.9e-133) (* t (/ y (- y z))) (if (<= y 5.2e-98) (* x (/ t z)) (* t (- 1.0 (/ x y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e-133) {
tmp = t * (y / (y - z));
} else if (y <= 5.2e-98) {
tmp = x * (t / z);
} else {
tmp = t * (1.0 - (x / 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 <= (-2.9d-133)) then
tmp = t * (y / (y - z))
else if (y <= 5.2d-98) then
tmp = x * (t / z)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e-133) {
tmp = t * (y / (y - z));
} else if (y <= 5.2e-98) {
tmp = x * (t / z);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e-133: tmp = t * (y / (y - z)) elif y <= 5.2e-98: tmp = x * (t / z) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e-133) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (y <= 5.2e-98) tmp = Float64(x * Float64(t / z)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.9e-133) tmp = t * (y / (y - z)); elseif (y <= 5.2e-98) tmp = x * (t / z); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e-133], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-98], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-133}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-98}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -2.8999999999999998e-133Initial program 98.8%
associate-*l/85.1%
sub-neg85.1%
+-commutative85.1%
neg-sub085.1%
associate-+l-85.1%
neg-sub085.1%
distribute-neg-frac285.1%
distribute-frac-neg85.1%
distribute-lft-neg-in85.1%
sub-neg85.1%
distribute-neg-in85.1%
remove-double-neg85.1%
+-commutative85.1%
sub-neg85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in x around 0 59.7%
associate-/l*71.4%
Simplified71.4%
if -2.8999999999999998e-133 < y < 5.20000000000000027e-98Initial program 92.6%
associate-*l/90.9%
associate-/l*90.8%
Simplified90.8%
associate-*r/90.9%
associate-*l/92.6%
*-commutative92.6%
clear-num92.0%
un-div-inv92.0%
Applied egg-rr92.0%
Taylor expanded in x around inf 80.9%
associate-*l/82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in z around inf 75.3%
if 5.20000000000000027e-98 < y Initial program 98.7%
associate-*l/80.4%
sub-neg80.4%
+-commutative80.4%
neg-sub080.4%
associate-+l-80.4%
neg-sub080.4%
distribute-neg-frac280.4%
distribute-frac-neg80.4%
distribute-lft-neg-in80.4%
sub-neg80.4%
distribute-neg-in80.4%
remove-double-neg80.4%
+-commutative80.4%
sub-neg80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in z around 0 60.0%
associate-/l*71.7%
div-sub71.7%
*-inverses71.7%
Simplified71.7%
Final simplification72.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.6e-90) t (if (<= y 1.98) (* t (/ y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.6e-90) {
tmp = t;
} else if (y <= 1.98) {
tmp = t * (y / 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.6d-90)) then
tmp = t
else if (y <= 1.98d0) then
tmp = t * (y / 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.6e-90) {
tmp = t;
} else if (y <= 1.98) {
tmp = t * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.6e-90: tmp = t elif y <= 1.98: tmp = t * (y / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.6e-90) tmp = t; elseif (y <= 1.98) tmp = Float64(t * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.6e-90) tmp = t; elseif (y <= 1.98) tmp = t * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.6e-90], t, If[LessEqual[y, 1.98], N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-90}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.98:\\
\;\;\;\;t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.60000000000000004e-90 or 1.98 < y Initial program 99.2%
associate-*l/81.3%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in y around inf 51.8%
if -1.60000000000000004e-90 < y < 1.98Initial program 93.3%
associate-*l/91.2%
sub-neg91.2%
+-commutative91.2%
neg-sub091.2%
associate-+l-91.2%
neg-sub091.2%
distribute-neg-frac291.2%
distribute-frac-neg91.2%
distribute-lft-neg-in91.2%
sub-neg91.2%
distribute-neg-in91.2%
remove-double-neg91.2%
+-commutative91.2%
sub-neg91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in x around 0 39.3%
associate-/l*40.7%
Simplified40.7%
Taylor expanded in y around 0 35.9%
mul-1-neg35.9%
associate-/l*34.6%
distribute-rgt-neg-in34.6%
distribute-neg-frac234.6%
Simplified34.6%
add034.6%
clear-num34.1%
un-div-inv34.1%
add-sqr-sqrt14.7%
sqrt-unprod32.3%
sqr-neg32.3%
sqrt-unprod13.3%
add-sqr-sqrt27.9%
Applied egg-rr27.9%
associate-/r/32.2%
mul0-lft32.2%
distribute-rgt-in32.2%
add032.2%
associate-/l*27.8%
*-commutative27.8%
associate-/l*27.9%
Simplified27.9%
Final simplification41.7%
(FPCore (x y z t) :precision binary64 (if (<= y -0.115) t (if (<= y 0.98) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.115) {
tmp = t;
} else if (y <= 0.98) {
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 <= (-0.115d0)) then
tmp = t
else if (y <= 0.98d0) 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 <= -0.115) {
tmp = t;
} else if (y <= 0.98) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.115: tmp = t elif y <= 0.98: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.115) tmp = t; elseif (y <= 0.98) 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 <= -0.115) tmp = t; elseif (y <= 0.98) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.115], t, If[LessEqual[y, 0.98], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.115:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.98:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -0.115000000000000005 or 0.97999999999999998 < y Initial program 99.8%
associate-*l/78.1%
associate-/l*75.1%
Simplified75.1%
Taylor expanded in y around inf 57.9%
if -0.115000000000000005 < y < 0.97999999999999998Initial program 93.7%
associate-*l/92.7%
associate-/l*92.5%
Simplified92.5%
associate-*r/92.7%
associate-*l/93.7%
*-commutative93.7%
clear-num93.2%
un-div-inv93.6%
Applied egg-rr93.6%
Taylor expanded in x around inf 73.4%
associate-*l/74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in z around inf 61.0%
Final simplification59.5%
(FPCore (x y z t) :precision binary64 (if (<= y -510000000000.0) t (if (<= y 4.5) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -510000000000.0) {
tmp = t;
} else if (y <= 4.5) {
tmp = t * (x / 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 <= (-510000000000.0d0)) then
tmp = t
else if (y <= 4.5d0) then
tmp = t * (x / 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 <= -510000000000.0) {
tmp = t;
} else if (y <= 4.5) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -510000000000.0: tmp = t elif y <= 4.5: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -510000000000.0) tmp = t; elseif (y <= 4.5) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -510000000000.0) tmp = t; elseif (y <= 4.5) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -510000000000.0], t, If[LessEqual[y, 4.5], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -510000000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.5:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.1e11 or 4.5 < y Initial program 99.8%
associate-*l/77.9%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in y around inf 58.3%
if -5.1e11 < y < 4.5Initial program 93.7%
Taylor expanded in y around 0 62.0%
Final simplification60.2%
(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 96.7%
associate-*l/85.5%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in y around inf 34.4%
Final simplification34.4%
(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 2024046
(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))