
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(FPCore (x y z t) :precision binary64 (* x (/ (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
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) / (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
def code(x, y, z, t): return x * ((y - z) / (t - z))
function code(x, y, z, t) return Float64(x * Float64(Float64(y - z) / Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x * ((y - z) / (t - z)); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y - z}{t - z}
\end{array}
Initial program 83.9%
associate-/l*96.6%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))) (t_2 (* x (- (/ y t) (/ z t)))))
(if (<= t -1.35e-21)
t_2
(if (<= t 6.8e-39)
t_1
(if (<= t 3.3e-18) (/ x (/ (- t z) y)) (if (<= t 2.25e+15) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double t_2 = x * ((y / t) - (z / t));
double tmp;
if (t <= -1.35e-21) {
tmp = t_2;
} else if (t <= 6.8e-39) {
tmp = t_1;
} else if (t <= 3.3e-18) {
tmp = x / ((t - z) / y);
} else if (t <= 2.25e+15) {
tmp = t_1;
} 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 = x * (1.0d0 - (y / z))
t_2 = x * ((y / t) - (z / t))
if (t <= (-1.35d-21)) then
tmp = t_2
else if (t <= 6.8d-39) then
tmp = t_1
else if (t <= 3.3d-18) then
tmp = x / ((t - z) / y)
else if (t <= 2.25d+15) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double t_2 = x * ((y / t) - (z / t));
double tmp;
if (t <= -1.35e-21) {
tmp = t_2;
} else if (t <= 6.8e-39) {
tmp = t_1;
} else if (t <= 3.3e-18) {
tmp = x / ((t - z) / y);
} else if (t <= 2.25e+15) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) t_2 = x * ((y / t) - (z / t)) tmp = 0 if t <= -1.35e-21: tmp = t_2 elif t <= 6.8e-39: tmp = t_1 elif t <= 3.3e-18: tmp = x / ((t - z) / y) elif t <= 2.25e+15: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) t_2 = Float64(x * Float64(Float64(y / t) - Float64(z / t))) tmp = 0.0 if (t <= -1.35e-21) tmp = t_2; elseif (t <= 6.8e-39) tmp = t_1; elseif (t <= 3.3e-18) tmp = Float64(x / Float64(Float64(t - z) / y)); elseif (t <= 2.25e+15) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); t_2 = x * ((y / t) - (z / t)); tmp = 0.0; if (t <= -1.35e-21) tmp = t_2; elseif (t <= 6.8e-39) tmp = t_1; elseif (t <= 3.3e-18) tmp = x / ((t - z) / y); elseif (t <= 2.25e+15) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / t), $MachinePrecision] - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e-21], t$95$2, If[LessEqual[t, 6.8e-39], t$95$1, If[LessEqual[t, 3.3e-18], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+15], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
t_2 := x \cdot \left(\frac{y}{t} - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.3500000000000001e-21 or 2.25e15 < t Initial program 83.0%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in t around inf 73.2%
associate-/l*81.7%
Simplified81.7%
div-sub81.8%
Applied egg-rr81.8%
if -1.3500000000000001e-21 < t < 6.7999999999999998e-39 or 3.3000000000000002e-18 < t < 2.25e15Initial program 84.7%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in t around 0 72.0%
mul-1-neg72.0%
associate-/l*83.0%
distribute-rgt-neg-in83.0%
distribute-frac-neg83.0%
neg-sub083.0%
associate--r-83.0%
neg-sub083.0%
+-commutative83.0%
sub-neg83.0%
div-sub83.0%
*-inverses83.0%
Simplified83.0%
if 6.7999999999999998e-39 < t < 3.3000000000000002e-18Initial program 84.2%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 82.2%
Final simplification82.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= y -2e+49)
t_1
(if (<= y -5.3e-13)
(* x (- 1.0 (/ y z)))
(if (or (<= y -4.8e-64) (not (<= y 4.2e+57)))
t_1
(* x (/ z (- z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (y <= -2e+49) {
tmp = t_1;
} else if (y <= -5.3e-13) {
tmp = x * (1.0 - (y / z));
} else if ((y <= -4.8e-64) || !(y <= 4.2e+57)) {
tmp = t_1;
} else {
tmp = x * (z / (z - 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 = x * (y / (t - z))
if (y <= (-2d+49)) then
tmp = t_1
else if (y <= (-5.3d-13)) then
tmp = x * (1.0d0 - (y / z))
else if ((y <= (-4.8d-64)) .or. (.not. (y <= 4.2d+57))) then
tmp = t_1
else
tmp = x * (z / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (y <= -2e+49) {
tmp = t_1;
} else if (y <= -5.3e-13) {
tmp = x * (1.0 - (y / z));
} else if ((y <= -4.8e-64) || !(y <= 4.2e+57)) {
tmp = t_1;
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if y <= -2e+49: tmp = t_1 elif y <= -5.3e-13: tmp = x * (1.0 - (y / z)) elif (y <= -4.8e-64) or not (y <= 4.2e+57): tmp = t_1 else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (y <= -2e+49) tmp = t_1; elseif (y <= -5.3e-13) tmp = Float64(x * Float64(1.0 - Float64(y / z))); elseif ((y <= -4.8e-64) || !(y <= 4.2e+57)) tmp = t_1; else tmp = Float64(x * Float64(z / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); tmp = 0.0; if (y <= -2e+49) tmp = t_1; elseif (y <= -5.3e-13) tmp = x * (1.0 - (y / z)); elseif ((y <= -4.8e-64) || ~((y <= 4.2e+57))) tmp = t_1; else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+49], t$95$1, If[LessEqual[y, -5.3e-13], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.8e-64], N[Not[LessEqual[y, 4.2e+57]], $MachinePrecision]], t$95$1, N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;y \leq -2 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.3 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-64} \lor \neg \left(y \leq 4.2 \cdot 10^{+57}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if y < -1.99999999999999989e49 or -5.2999999999999996e-13 < y < -4.79999999999999997e-64 or 4.19999999999999982e57 < y Initial program 87.7%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in y around inf 78.0%
associate-/l*78.3%
Simplified78.3%
if -1.99999999999999989e49 < y < -5.2999999999999996e-13Initial program 68.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 56.1%
mul-1-neg56.1%
associate-/l*84.9%
distribute-rgt-neg-in84.9%
distribute-frac-neg84.9%
neg-sub084.9%
associate--r-84.9%
neg-sub084.9%
+-commutative84.9%
sub-neg84.9%
div-sub84.9%
*-inverses84.9%
Simplified84.9%
if -4.79999999999999997e-64 < y < 4.19999999999999982e57Initial program 81.9%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in y around 0 66.3%
mul-1-neg66.3%
distribute-neg-frac266.3%
neg-sub066.3%
associate--r-66.3%
neg-sub066.3%
+-commutative66.3%
sub-neg66.3%
associate-/l*83.2%
Simplified83.2%
Final simplification81.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))) (t_2 (* x (/ (- y z) t))))
(if (<= t -1.35e-21)
t_2
(if (<= t 2.35e-39)
t_1
(if (<= t 2.9e-18)
(* x (/ y (- t z)))
(if (<= t 88000000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double t_2 = x * ((y - z) / t);
double tmp;
if (t <= -1.35e-21) {
tmp = t_2;
} else if (t <= 2.35e-39) {
tmp = t_1;
} else if (t <= 2.9e-18) {
tmp = x * (y / (t - z));
} else if (t <= 88000000000000.0) {
tmp = t_1;
} 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 = x * (1.0d0 - (y / z))
t_2 = x * ((y - z) / t)
if (t <= (-1.35d-21)) then
tmp = t_2
else if (t <= 2.35d-39) then
tmp = t_1
else if (t <= 2.9d-18) then
tmp = x * (y / (t - z))
else if (t <= 88000000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double t_2 = x * ((y - z) / t);
double tmp;
if (t <= -1.35e-21) {
tmp = t_2;
} else if (t <= 2.35e-39) {
tmp = t_1;
} else if (t <= 2.9e-18) {
tmp = x * (y / (t - z));
} else if (t <= 88000000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) t_2 = x * ((y - z) / t) tmp = 0 if t <= -1.35e-21: tmp = t_2 elif t <= 2.35e-39: tmp = t_1 elif t <= 2.9e-18: tmp = x * (y / (t - z)) elif t <= 88000000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) t_2 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (t <= -1.35e-21) tmp = t_2; elseif (t <= 2.35e-39) tmp = t_1; elseif (t <= 2.9e-18) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (t <= 88000000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); t_2 = x * ((y - z) / t); tmp = 0.0; if (t <= -1.35e-21) tmp = t_2; elseif (t <= 2.35e-39) tmp = t_1; elseif (t <= 2.9e-18) tmp = x * (y / (t - z)); elseif (t <= 88000000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e-21], t$95$2, If[LessEqual[t, 2.35e-39], t$95$1, If[LessEqual[t, 2.9e-18], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 88000000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
t_2 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-18}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;t \leq 88000000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.3500000000000001e-21 or 8.8e13 < t Initial program 83.0%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in t around inf 73.2%
associate-/l*81.7%
Simplified81.7%
if -1.3500000000000001e-21 < t < 2.3500000000000001e-39 or 2.9e-18 < t < 8.8e13Initial program 84.7%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in t around 0 72.0%
mul-1-neg72.0%
associate-/l*83.0%
distribute-rgt-neg-in83.0%
distribute-frac-neg83.0%
neg-sub083.0%
associate--r-83.0%
neg-sub083.0%
+-commutative83.0%
sub-neg83.0%
div-sub83.0%
*-inverses83.0%
Simplified83.0%
if 2.3500000000000001e-39 < t < 2.9e-18Initial program 84.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 76.8%
associate-/l*82.0%
Simplified82.0%
Final simplification82.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))) (t_2 (* x (/ (- y z) t))))
(if (<= t -1.15e-21)
t_2
(if (<= t 1.5e-38)
t_1
(if (<= t 3.4e-18) (/ x (/ (- t z) y)) (if (<= t 9.8e+14) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double t_2 = x * ((y - z) / t);
double tmp;
if (t <= -1.15e-21) {
tmp = t_2;
} else if (t <= 1.5e-38) {
tmp = t_1;
} else if (t <= 3.4e-18) {
tmp = x / ((t - z) / y);
} else if (t <= 9.8e+14) {
tmp = t_1;
} 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 = x * (1.0d0 - (y / z))
t_2 = x * ((y - z) / t)
if (t <= (-1.15d-21)) then
tmp = t_2
else if (t <= 1.5d-38) then
tmp = t_1
else if (t <= 3.4d-18) then
tmp = x / ((t - z) / y)
else if (t <= 9.8d+14) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double t_2 = x * ((y - z) / t);
double tmp;
if (t <= -1.15e-21) {
tmp = t_2;
} else if (t <= 1.5e-38) {
tmp = t_1;
} else if (t <= 3.4e-18) {
tmp = x / ((t - z) / y);
} else if (t <= 9.8e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) t_2 = x * ((y - z) / t) tmp = 0 if t <= -1.15e-21: tmp = t_2 elif t <= 1.5e-38: tmp = t_1 elif t <= 3.4e-18: tmp = x / ((t - z) / y) elif t <= 9.8e+14: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) t_2 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (t <= -1.15e-21) tmp = t_2; elseif (t <= 1.5e-38) tmp = t_1; elseif (t <= 3.4e-18) tmp = Float64(x / Float64(Float64(t - z) / y)); elseif (t <= 9.8e+14) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); t_2 = x * ((y - z) / t); tmp = 0.0; if (t <= -1.15e-21) tmp = t_2; elseif (t <= 1.5e-38) tmp = t_1; elseif (t <= 3.4e-18) tmp = x / ((t - z) / y); elseif (t <= 9.8e+14) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e-21], t$95$2, If[LessEqual[t, 1.5e-38], t$95$1, If[LessEqual[t, 3.4e-18], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e+14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
t_2 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.15e-21 or 9.8e14 < t Initial program 83.0%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in t around inf 73.2%
associate-/l*81.7%
Simplified81.7%
if -1.15e-21 < t < 1.49999999999999994e-38 or 3.40000000000000001e-18 < t < 9.8e14Initial program 84.7%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in t around 0 72.0%
mul-1-neg72.0%
associate-/l*83.0%
distribute-rgt-neg-in83.0%
distribute-frac-neg83.0%
neg-sub083.0%
associate--r-83.0%
neg-sub083.0%
+-commutative83.0%
sub-neg83.0%
div-sub83.0%
*-inverses83.0%
Simplified83.0%
if 1.49999999999999994e-38 < t < 3.40000000000000001e-18Initial program 84.2%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 82.2%
Final simplification82.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.8e+60)
x
(if (<= z 1.7e-92)
(/ (* x y) t)
(if (<= z 2.6e-58) (/ x (/ (- z) y)) (if (<= z 6e-22) (* x (/ y t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+60) {
tmp = x;
} else if (z <= 1.7e-92) {
tmp = (x * y) / t;
} else if (z <= 2.6e-58) {
tmp = x / (-z / y);
} else if (z <= 6e-22) {
tmp = x * (y / t);
} else {
tmp = 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 (z <= (-6.8d+60)) then
tmp = x
else if (z <= 1.7d-92) then
tmp = (x * y) / t
else if (z <= 2.6d-58) then
tmp = x / (-z / y)
else if (z <= 6d-22) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+60) {
tmp = x;
} else if (z <= 1.7e-92) {
tmp = (x * y) / t;
} else if (z <= 2.6e-58) {
tmp = x / (-z / y);
} else if (z <= 6e-22) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.8e+60: tmp = x elif z <= 1.7e-92: tmp = (x * y) / t elif z <= 2.6e-58: tmp = x / (-z / y) elif z <= 6e-22: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.8e+60) tmp = x; elseif (z <= 1.7e-92) tmp = Float64(Float64(x * y) / t); elseif (z <= 2.6e-58) tmp = Float64(x / Float64(Float64(-z) / y)); elseif (z <= 6e-22) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.8e+60) tmp = x; elseif (z <= 1.7e-92) tmp = (x * y) / t; elseif (z <= 2.6e-58) tmp = x / (-z / y); elseif (z <= 6e-22) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.8e+60], x, If[LessEqual[z, 1.7e-92], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.6e-58], N[(x / N[((-z) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-22], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-92}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{\frac{-z}{y}}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.7999999999999999e60 or 5.9999999999999998e-22 < z Initial program 69.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 57.7%
if -6.7999999999999999e60 < z < 1.7000000000000001e-92Initial program 95.5%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in z around 0 59.0%
if 1.7000000000000001e-92 < z < 2.60000000000000007e-58Initial program 99.9%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in t around 0 80.2%
mul-1-neg80.2%
associate-/l*71.6%
distribute-rgt-neg-in71.6%
distribute-frac-neg71.6%
neg-sub071.6%
associate--r-71.6%
neg-sub071.6%
+-commutative71.6%
sub-neg71.6%
div-sub71.6%
*-inverses71.6%
Simplified71.6%
Taylor expanded in y around inf 64.8%
associate-*r/64.8%
mul-1-neg64.8%
distribute-rgt-neg-in64.8%
associate-*r/56.2%
Simplified56.2%
clear-num56.3%
un-div-inv56.2%
add-sqr-sqrt55.2%
sqrt-unprod56.5%
sqr-neg56.5%
sqrt-unprod10.5%
add-sqr-sqrt11.3%
Applied egg-rr11.3%
associate-/r/11.7%
associate-*l/11.3%
associate-*r/11.3%
Simplified11.3%
add-sqr-sqrt10.7%
sqrt-unprod21.0%
sqr-neg21.0%
sqrt-unprod10.0%
add-sqr-sqrt56.2%
distribute-lft-neg-out56.2%
clear-num56.3%
un-div-inv56.2%
Applied egg-rr56.2%
if 2.60000000000000007e-58 < z < 5.9999999999999998e-22Initial program 100.0%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in z around 0 47.1%
associate-/l*47.1%
Simplified47.1%
Final simplification57.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.6e+61)
x
(if (<= z 2.5e-92)
(/ (* x y) t)
(if (<= z 1.35e-59)
(/ (* x y) (- z))
(if (<= z 2.8e-22) (* x (/ y t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.6e+61) {
tmp = x;
} else if (z <= 2.5e-92) {
tmp = (x * y) / t;
} else if (z <= 1.35e-59) {
tmp = (x * y) / -z;
} else if (z <= 2.8e-22) {
tmp = x * (y / t);
} else {
tmp = 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 (z <= (-6.6d+61)) then
tmp = x
else if (z <= 2.5d-92) then
tmp = (x * y) / t
else if (z <= 1.35d-59) then
tmp = (x * y) / -z
else if (z <= 2.8d-22) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.6e+61) {
tmp = x;
} else if (z <= 2.5e-92) {
tmp = (x * y) / t;
} else if (z <= 1.35e-59) {
tmp = (x * y) / -z;
} else if (z <= 2.8e-22) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.6e+61: tmp = x elif z <= 2.5e-92: tmp = (x * y) / t elif z <= 1.35e-59: tmp = (x * y) / -z elif z <= 2.8e-22: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.6e+61) tmp = x; elseif (z <= 2.5e-92) tmp = Float64(Float64(x * y) / t); elseif (z <= 1.35e-59) tmp = Float64(Float64(x * y) / Float64(-z)); elseif (z <= 2.8e-22) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.6e+61) tmp = x; elseif (z <= 2.5e-92) tmp = (x * y) / t; elseif (z <= 1.35e-59) tmp = (x * y) / -z; elseif (z <= 2.8e-22) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.6e+61], x, If[LessEqual[z, 2.5e-92], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.35e-59], N[(N[(x * y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 2.8e-22], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-59}:\\
\;\;\;\;\frac{x \cdot y}{-z}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.5999999999999995e61 or 2.79999999999999995e-22 < z Initial program 69.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 57.7%
if -6.5999999999999995e61 < z < 2.50000000000000006e-92Initial program 95.5%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in z around 0 59.0%
if 2.50000000000000006e-92 < z < 1.3499999999999999e-59Initial program 99.9%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in t around 0 80.2%
mul-1-neg80.2%
associate-/l*71.6%
distribute-rgt-neg-in71.6%
distribute-frac-neg71.6%
neg-sub071.6%
associate--r-71.6%
neg-sub071.6%
+-commutative71.6%
sub-neg71.6%
div-sub71.6%
*-inverses71.6%
Simplified71.6%
Taylor expanded in y around inf 64.8%
associate-*r/64.8%
associate-*r*64.8%
neg-mul-164.8%
Simplified64.8%
if 1.3499999999999999e-59 < z < 2.79999999999999995e-22Initial program 100.0%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in z around 0 47.1%
associate-/l*47.1%
Simplified47.1%
Final simplification58.2%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.35e-21)
(* x (/ y t))
(if (<= t 2.8e+15)
(* x (- 1.0 (/ y z)))
(if (<= t 5.7e+249) (/ x (/ t y)) (* x (/ (- z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.35e-21) {
tmp = x * (y / t);
} else if (t <= 2.8e+15) {
tmp = x * (1.0 - (y / z));
} else if (t <= 5.7e+249) {
tmp = x / (t / y);
} else {
tmp = x * (-z / 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 (t <= (-1.35d-21)) then
tmp = x * (y / t)
else if (t <= 2.8d+15) then
tmp = x * (1.0d0 - (y / z))
else if (t <= 5.7d+249) then
tmp = x / (t / y)
else
tmp = x * (-z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.35e-21) {
tmp = x * (y / t);
} else if (t <= 2.8e+15) {
tmp = x * (1.0 - (y / z));
} else if (t <= 5.7e+249) {
tmp = x / (t / y);
} else {
tmp = x * (-z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.35e-21: tmp = x * (y / t) elif t <= 2.8e+15: tmp = x * (1.0 - (y / z)) elif t <= 5.7e+249: tmp = x / (t / y) else: tmp = x * (-z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.35e-21) tmp = Float64(x * Float64(y / t)); elseif (t <= 2.8e+15) tmp = Float64(x * Float64(1.0 - Float64(y / z))); elseif (t <= 5.7e+249) tmp = Float64(x / Float64(t / y)); else tmp = Float64(x * Float64(Float64(-z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.35e-21) tmp = x * (y / t); elseif (t <= 2.8e+15) tmp = x * (1.0 - (y / z)); elseif (t <= 5.7e+249) tmp = x / (t / y); else tmp = x * (-z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.35e-21], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+15], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.7e+249], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-21}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+15}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{+249}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\end{array}
\end{array}
if t < -1.3500000000000001e-21Initial program 88.5%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in z around 0 56.3%
associate-/l*56.7%
Simplified56.7%
if -1.3500000000000001e-21 < t < 2.8e15Initial program 84.6%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in t around 0 68.6%
mul-1-neg68.6%
associate-/l*79.5%
distribute-rgt-neg-in79.5%
distribute-frac-neg79.5%
neg-sub079.5%
associate--r-79.5%
neg-sub079.5%
+-commutative79.5%
sub-neg79.5%
div-sub79.5%
*-inverses79.5%
Simplified79.5%
if 2.8e15 < t < 5.70000000000000035e249Initial program 78.8%
associate-/l*99.3%
Simplified99.3%
clear-num99.2%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 57.0%
if 5.70000000000000035e249 < t Initial program 61.7%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in t around inf 61.7%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in y around 0 61.7%
mul-1-neg61.7%
associate-/l*95.0%
distribute-rgt-neg-in95.0%
distribute-neg-frac295.0%
Simplified95.0%
Final simplification71.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.45e+62) (not (<= z 4.1e-22))) (* x (- 1.0 (/ y z))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.45e+62) || !(z <= 4.1e-22)) {
tmp = x * (1.0 - (y / z));
} 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 ((z <= (-1.45d+62)) .or. (.not. (z <= 4.1d-22))) then
tmp = x * (1.0d0 - (y / z))
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 ((z <= -1.45e+62) || !(z <= 4.1e-22)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.45e+62) or not (z <= 4.1e-22): tmp = x * (1.0 - (y / z)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.45e+62) || !(z <= 4.1e-22)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.45e+62) || ~((z <= 4.1e-22))) tmp = x * (1.0 - (y / z)); else tmp = x * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.45e+62], N[Not[LessEqual[z, 4.1e-22]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+62} \lor \neg \left(z \leq 4.1 \cdot 10^{-22}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -1.44999999999999992e62 or 4.0999999999999999e-22 < z Initial program 69.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 55.8%
mul-1-neg55.8%
associate-/l*77.0%
distribute-rgt-neg-in77.0%
distribute-frac-neg77.0%
neg-sub077.0%
associate--r-77.0%
neg-sub077.0%
+-commutative77.0%
sub-neg77.0%
div-sub77.0%
*-inverses77.0%
Simplified77.0%
if -1.44999999999999992e62 < z < 4.0999999999999999e-22Initial program 96.2%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in y around inf 74.3%
associate-/l*70.4%
Simplified70.4%
Final simplification73.4%
(FPCore (x y z t) :precision binary64 (if (<= z -6.8e+60) x (if (<= z 6e-22) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+60) {
tmp = x;
} else if (z <= 6e-22) {
tmp = x * (y / t);
} else {
tmp = 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 (z <= (-6.8d+60)) then
tmp = x
else if (z <= 6d-22) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+60) {
tmp = x;
} else if (z <= 6e-22) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.8e+60: tmp = x elif z <= 6e-22: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.8e+60) tmp = x; elseif (z <= 6e-22) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.8e+60) tmp = x; elseif (z <= 6e-22) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.8e+60], x, If[LessEqual[z, 6e-22], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.7999999999999999e60 or 5.9999999999999998e-22 < z Initial program 69.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 57.7%
if -6.7999999999999999e60 < z < 5.9999999999999998e-22Initial program 96.1%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 54.4%
associate-/l*52.5%
Simplified52.5%
Final simplification54.9%
(FPCore (x y z t) :precision binary64 (if (<= z -6.8e+60) x (if (<= z 5.4e-22) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+60) {
tmp = x;
} else if (z <= 5.4e-22) {
tmp = y * (x / t);
} else {
tmp = 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 (z <= (-6.8d+60)) then
tmp = x
else if (z <= 5.4d-22) then
tmp = y * (x / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+60) {
tmp = x;
} else if (z <= 5.4e-22) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.8e+60: tmp = x elif z <= 5.4e-22: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.8e+60) tmp = x; elseif (z <= 5.4e-22) tmp = Float64(y * Float64(x / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.8e+60) tmp = x; elseif (z <= 5.4e-22) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.8e+60], x, If[LessEqual[z, 5.4e-22], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-22}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.7999999999999999e60 or 5.4000000000000004e-22 < z Initial program 69.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 57.7%
if -6.7999999999999999e60 < z < 5.4000000000000004e-22Initial program 96.1%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 54.4%
*-commutative54.4%
associate-/l*52.9%
Applied egg-rr52.9%
Final simplification55.1%
(FPCore (x y z t) :precision binary64 (if (<= z -8.8e+60) x (if (<= z 7.5e-23) (/ (* x y) t) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.8e+60) {
tmp = x;
} else if (z <= 7.5e-23) {
tmp = (x * y) / t;
} else {
tmp = 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 (z <= (-8.8d+60)) then
tmp = x
else if (z <= 7.5d-23) then
tmp = (x * y) / t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.8e+60) {
tmp = x;
} else if (z <= 7.5e-23) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -8.8e+60: tmp = x elif z <= 7.5e-23: tmp = (x * y) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -8.8e+60) tmp = x; elseif (z <= 7.5e-23) tmp = Float64(Float64(x * y) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -8.8e+60) tmp = x; elseif (z <= 7.5e-23) tmp = (x * y) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.8e+60], x, If[LessEqual[z, 7.5e-23], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.79999999999999984e60 or 7.4999999999999998e-23 < z Initial program 69.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 57.7%
if -8.79999999999999984e60 < z < 7.4999999999999998e-23Initial program 96.1%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 54.4%
Final simplification55.9%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 83.9%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in z around inf 34.1%
Final simplification34.1%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
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 / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2024055
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))