
(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}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 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(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}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
(FPCore (x y z t) :precision binary64 (/ -1.0 (* (- y z) (/ (- z t) x))))
double code(double x, double y, double z, double t) {
return -1.0 / ((y - z) * ((z - t) / 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 = (-1.0d0) / ((y - z) * ((z - t) / x))
end function
public static double code(double x, double y, double z, double t) {
return -1.0 / ((y - z) * ((z - t) / x));
}
def code(x, y, z, t): return -1.0 / ((y - z) * ((z - t) / x))
function code(x, y, z, t) return Float64(-1.0 / Float64(Float64(y - z) * Float64(Float64(z - t) / x))) end
function tmp = code(x, y, z, t) tmp = -1.0 / ((y - z) * ((z - t) / x)); end
code[x_, y_, z_, t_] := N[(-1.0 / N[(N[(y - z), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{\left(y - z\right) \cdot \frac{z - t}{x}}
\end{array}
Initial program 88.4%
associate-/l/98.0%
clear-num97.7%
inv-pow97.7%
div-inv97.6%
clear-num97.7%
Applied egg-rr97.7%
unpow-197.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* y t))))
(if (<= y -6.4e+160)
(/ (/ x y) (- z))
(if (<= y -5.1e+76)
t_1
(if (<= y -6.5e+18)
(/ x (* y (- z)))
(if (or (<= y -9.8e-65) (not (<= y 490000000.0)))
t_1
(/ x (* z (- t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (y * t);
double tmp;
if (y <= -6.4e+160) {
tmp = (x / y) / -z;
} else if (y <= -5.1e+76) {
tmp = t_1;
} else if (y <= -6.5e+18) {
tmp = x / (y * -z);
} else if ((y <= -9.8e-65) || !(y <= 490000000.0)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (y * t)
if (y <= (-6.4d+160)) then
tmp = (x / y) / -z
else if (y <= (-5.1d+76)) then
tmp = t_1
else if (y <= (-6.5d+18)) then
tmp = x / (y * -z)
else if ((y <= (-9.8d-65)) .or. (.not. (y <= 490000000.0d0))) then
tmp = t_1
else
tmp = x / (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);
double tmp;
if (y <= -6.4e+160) {
tmp = (x / y) / -z;
} else if (y <= -5.1e+76) {
tmp = t_1;
} else if (y <= -6.5e+18) {
tmp = x / (y * -z);
} else if ((y <= -9.8e-65) || !(y <= 490000000.0)) {
tmp = t_1;
} else {
tmp = x / (z * -t);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (y * t) tmp = 0 if y <= -6.4e+160: tmp = (x / y) / -z elif y <= -5.1e+76: tmp = t_1 elif y <= -6.5e+18: tmp = x / (y * -z) elif (y <= -9.8e-65) or not (y <= 490000000.0): tmp = t_1 else: tmp = x / (z * -t) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(y * t)) tmp = 0.0 if (y <= -6.4e+160) tmp = Float64(Float64(x / y) / Float64(-z)); elseif (y <= -5.1e+76) tmp = t_1; elseif (y <= -6.5e+18) tmp = Float64(x / Float64(y * Float64(-z))); elseif ((y <= -9.8e-65) || !(y <= 490000000.0)) tmp = t_1; else tmp = Float64(x / Float64(z * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (y * t); tmp = 0.0; if (y <= -6.4e+160) tmp = (x / y) / -z; elseif (y <= -5.1e+76) tmp = t_1; elseif (y <= -6.5e+18) tmp = x / (y * -z); elseif ((y <= -9.8e-65) || ~((y <= 490000000.0))) tmp = t_1; else tmp = x / (z * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.4e+160], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[y, -5.1e+76], t$95$1, If[LessEqual[y, -6.5e+18], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -9.8e-65], N[Not[LessEqual[y, 490000000.0]], $MachinePrecision]], t$95$1, N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot t}\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+160}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{elif}\;y \leq -5.1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{elif}\;y \leq -9.8 \cdot 10^{-65} \lor \neg \left(y \leq 490000000\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -6.3999999999999995e160Initial program 85.2%
Taylor expanded in t around 0 69.1%
mul-1-neg69.1%
distribute-rgt-neg-in69.1%
neg-sub069.1%
sub-neg69.1%
+-commutative69.1%
associate--r+69.1%
neg-sub069.1%
remove-double-neg69.1%
Simplified69.1%
Taylor expanded in z around 0 69.1%
associate-*r/69.1%
neg-mul-169.1%
Simplified69.1%
Taylor expanded in x around 0 69.1%
mul-1-neg69.1%
associate-/r*80.5%
distribute-neg-frac280.5%
Simplified80.5%
if -6.3999999999999995e160 < y < -5.1000000000000002e76 or -6.5e18 < y < -9.79999999999999929e-65 or 4.9e8 < y Initial program 88.5%
Taylor expanded in z around 0 48.1%
if -5.1000000000000002e76 < y < -6.5e18Initial program 99.9%
Taylor expanded in t around 0 65.4%
mul-1-neg65.4%
distribute-rgt-neg-in65.4%
neg-sub065.4%
sub-neg65.4%
+-commutative65.4%
associate--r+65.4%
neg-sub065.4%
remove-double-neg65.4%
Simplified65.4%
Taylor expanded in z around 0 48.2%
associate-*r/48.2%
neg-mul-148.2%
Simplified48.2%
if -9.79999999999999929e-65 < y < 4.9e8Initial program 88.1%
associate-/l/98.1%
clear-num97.8%
inv-pow97.8%
div-inv97.7%
clear-num97.8%
Applied egg-rr97.8%
unpow-197.8%
Simplified97.8%
Taylor expanded in t around inf 51.9%
associate-/l*56.3%
Simplified56.3%
Taylor expanded in y around 0 39.9%
mul-1-neg39.9%
distribute-neg-frac239.9%
mul-1-neg39.9%
associate-*r*39.9%
neg-mul-139.9%
Simplified39.9%
Final simplification48.6%
(FPCore (x y z t)
:precision binary64
(if (<= t -7.4e-116)
(/ (/ x y) (- t z))
(if (or (<= t 5e-96) (and (not (<= t 8.6e-45)) (<= t 4.5e+21)))
(/ (/ x z) (- z y))
(/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.4e-116) {
tmp = (x / y) / (t - z);
} else if ((t <= 5e-96) || (!(t <= 8.6e-45) && (t <= 4.5e+21))) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - 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 (t <= (-7.4d-116)) then
tmp = (x / y) / (t - z)
else if ((t <= 5d-96) .or. (.not. (t <= 8.6d-45)) .and. (t <= 4.5d+21)) then
tmp = (x / z) / (z - y)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.4e-116) {
tmp = (x / y) / (t - z);
} else if ((t <= 5e-96) || (!(t <= 8.6e-45) && (t <= 4.5e+21))) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -7.4e-116: tmp = (x / y) / (t - z) elif (t <= 5e-96) or (not (t <= 8.6e-45) and (t <= 4.5e+21)): tmp = (x / z) / (z - y) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -7.4e-116) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif ((t <= 5e-96) || (!(t <= 8.6e-45) && (t <= 4.5e+21))) tmp = Float64(Float64(x / z) / Float64(z - y)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -7.4e-116) tmp = (x / y) / (t - z); elseif ((t <= 5e-96) || (~((t <= 8.6e-45)) && (t <= 4.5e+21))) tmp = (x / z) / (z - y); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -7.4e-116], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 5e-96], And[N[Not[LessEqual[t, 8.6e-45]], $MachinePrecision], LessEqual[t, 4.5e+21]]], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.4 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-96} \lor \neg \left(t \leq 8.6 \cdot 10^{-45}\right) \land t \leq 4.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -7.4000000000000005e-116Initial program 84.1%
Taylor expanded in y around inf 58.2%
associate-/r*62.6%
Simplified62.6%
if -7.4000000000000005e-116 < t < 4.99999999999999995e-96 or 8.5999999999999998e-45 < t < 4.5e21Initial program 91.7%
Taylor expanded in t around 0 79.6%
mul-1-neg79.6%
associate-/r*86.8%
distribute-neg-frac286.8%
neg-sub086.8%
sub-neg86.8%
+-commutative86.8%
associate--r+86.8%
neg-sub086.8%
remove-double-neg86.8%
Simplified86.8%
if 4.99999999999999995e-96 < t < 8.5999999999999998e-45 or 4.5e21 < t Initial program 88.4%
associate-/l/98.5%
Simplified98.5%
Taylor expanded in t around inf 81.8%
Final simplification77.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) (- y z))))
(if (<= t -3e+19)
t_1
(if (<= t 3e-96)
(/ x (* z (- z y)))
(if (or (<= t 1.45e-44) (not (<= t 4.8e+14)))
t_1
(/ x (* z (- z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / (y - z);
double tmp;
if (t <= -3e+19) {
tmp = t_1;
} else if (t <= 3e-96) {
tmp = x / (z * (z - y));
} else if ((t <= 1.45e-44) || !(t <= 4.8e+14)) {
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 / t) / (y - z)
if (t <= (-3d+19)) then
tmp = t_1
else if (t <= 3d-96) then
tmp = x / (z * (z - y))
else if ((t <= 1.45d-44) .or. (.not. (t <= 4.8d+14))) 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 / t) / (y - z);
double tmp;
if (t <= -3e+19) {
tmp = t_1;
} else if (t <= 3e-96) {
tmp = x / (z * (z - y));
} else if ((t <= 1.45e-44) || !(t <= 4.8e+14)) {
tmp = t_1;
} else {
tmp = x / (z * (z - t));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / t) / (y - z) tmp = 0 if t <= -3e+19: tmp = t_1 elif t <= 3e-96: tmp = x / (z * (z - y)) elif (t <= 1.45e-44) or not (t <= 4.8e+14): tmp = t_1 else: tmp = x / (z * (z - t)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / t) / Float64(y - z)) tmp = 0.0 if (t <= -3e+19) tmp = t_1; elseif (t <= 3e-96) tmp = Float64(x / Float64(z * Float64(z - y))); elseif ((t <= 1.45e-44) || !(t <= 4.8e+14)) 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 / t) / (y - z); tmp = 0.0; if (t <= -3e+19) tmp = t_1; elseif (t <= 3e-96) tmp = x / (z * (z - y)); elseif ((t <= 1.45e-44) || ~((t <= 4.8e+14))) tmp = t_1; else tmp = x / (z * (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+19], t$95$1, If[LessEqual[t, 3e-96], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.45e-44], N[Not[LessEqual[t, 4.8e+14]], $MachinePrecision]], t$95$1, N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y - z}\\
\mathbf{if}\;t \leq -3 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-96}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-44} \lor \neg \left(t \leq 4.8 \cdot 10^{+14}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\end{array}
\end{array}
if t < -3e19 or 3e-96 < t < 1.4500000000000001e-44 or 4.8e14 < t Initial program 85.3%
associate-/l/98.4%
Simplified98.4%
Taylor expanded in t around inf 81.3%
if -3e19 < t < 3e-96Initial program 91.6%
Taylor expanded in t around 0 75.1%
mul-1-neg75.1%
distribute-rgt-neg-in75.1%
neg-sub075.1%
sub-neg75.1%
+-commutative75.1%
associate--r+75.1%
neg-sub075.1%
remove-double-neg75.1%
Simplified75.1%
if 1.4500000000000001e-44 < t < 4.8e14Initial program 91.6%
Taylor expanded in y around 0 43.7%
mul-1-neg43.7%
distribute-neg-frac243.7%
distribute-rgt-neg-in43.7%
sub-neg43.7%
+-commutative43.7%
distribute-neg-in43.7%
remove-double-neg43.7%
unsub-neg43.7%
Simplified43.7%
Final simplification76.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (<= t_1 1e+306) (/ x t_1) (/ (/ x (- z t)) z))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= 1e+306) {
tmp = x / t_1;
} else {
tmp = (x / (z - 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 = (y - z) * (t - z)
if (t_1 <= 1d+306) then
tmp = x / t_1
else
tmp = (x / (z - t)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= 1e+306) {
tmp = x / t_1;
} else {
tmp = (x / (z - t)) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= 1e+306: tmp = x / t_1 else: tmp = (x / (z - t)) / z return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= 1e+306) tmp = Float64(x / t_1); else tmp = Float64(Float64(x / Float64(z - t)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if (t_1 <= 1e+306) tmp = x / t_1; else tmp = (x / (z - t)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+306], N[(x / t$95$1), $MachinePrecision], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z - t}}{z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < 1.00000000000000002e306Initial program 96.5%
if 1.00000000000000002e306 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 71.5%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around 0 88.0%
neg-mul-188.0%
Simplified88.0%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (<= y -700000000000.0) (/ (/ x y) (- t z)) (if (<= y 8800000000.0) (/ (/ x (- z t)) z) (/ 1.0 (* t (/ (- y z) x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -700000000000.0) {
tmp = (x / y) / (t - z);
} else if (y <= 8800000000.0) {
tmp = (x / (z - t)) / z;
} else {
tmp = 1.0 / (t * ((y - z) / x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-700000000000.0d0)) then
tmp = (x / y) / (t - z)
else if (y <= 8800000000.0d0) then
tmp = (x / (z - t)) / z
else
tmp = 1.0d0 / (t * ((y - z) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -700000000000.0) {
tmp = (x / y) / (t - z);
} else if (y <= 8800000000.0) {
tmp = (x / (z - t)) / z;
} else {
tmp = 1.0 / (t * ((y - z) / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -700000000000.0: tmp = (x / y) / (t - z) elif y <= 8800000000.0: tmp = (x / (z - t)) / z else: tmp = 1.0 / (t * ((y - z) / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -700000000000.0) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 8800000000.0) tmp = Float64(Float64(x / Float64(z - t)) / z); else tmp = Float64(1.0 / Float64(t * Float64(Float64(y - z) / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -700000000000.0) tmp = (x / y) / (t - z); elseif (y <= 8800000000.0) tmp = (x / (z - t)) / z; else tmp = 1.0 / (t * ((y - z) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -700000000000.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8800000000.0], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(1.0 / N[(t * N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -700000000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 8800000000:\\
\;\;\;\;\frac{\frac{x}{z - t}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y - z}{x}}\\
\end{array}
\end{array}
if y < -7e11Initial program 89.1%
Taylor expanded in y around inf 85.8%
associate-/r*88.7%
Simplified88.7%
if -7e11 < y < 8.8e9Initial program 89.0%
associate-/l/98.2%
Simplified98.2%
Taylor expanded in y around 0 83.5%
neg-mul-183.5%
Simplified83.5%
if 8.8e9 < y Initial program 86.9%
associate-/l/97.3%
clear-num97.0%
inv-pow97.0%
div-inv96.9%
clear-num96.9%
Applied egg-rr96.9%
unpow-196.9%
Simplified96.9%
Taylor expanded in t around inf 48.4%
associate-/l*62.5%
Simplified62.5%
Final simplification78.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.6e-14) (not (<= z 8.6e-91))) (/ x (* z (- z t))) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.6e-14) || !(z <= 8.6e-91)) {
tmp = x / (z * (z - t));
} else {
tmp = x / (y * 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 ((z <= (-5.6d-14)) .or. (.not. (z <= 8.6d-91))) then
tmp = x / (z * (z - t))
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.6e-14) || !(z <= 8.6e-91)) {
tmp = x / (z * (z - t));
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.6e-14) or not (z <= 8.6e-91): tmp = x / (z * (z - t)) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.6e-14) || !(z <= 8.6e-91)) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.6e-14) || ~((z <= 8.6e-91))) tmp = x / (z * (z - t)); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.6e-14], N[Not[LessEqual[z, 8.6e-91]], $MachinePrecision]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{-14} \lor \neg \left(z \leq 8.6 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -5.6000000000000001e-14 or 8.6e-91 < z Initial program 84.1%
Taylor expanded in y around 0 65.7%
mul-1-neg65.7%
distribute-neg-frac265.7%
distribute-rgt-neg-in65.7%
sub-neg65.7%
+-commutative65.7%
distribute-neg-in65.7%
remove-double-neg65.7%
unsub-neg65.7%
Simplified65.7%
if -5.6000000000000001e-14 < z < 8.6e-91Initial program 96.5%
Taylor expanded in z around 0 70.9%
Final simplification67.5%
(FPCore (x y z t) :precision binary64 (if (<= y -4600.0) (/ (/ x y) (- t z)) (if (<= y 2150000000.0) (/ (/ x (- z t)) z) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4600.0) {
tmp = (x / y) / (t - z);
} else if (y <= 2150000000.0) {
tmp = (x / (z - t)) / z;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4600.0d0)) then
tmp = (x / y) / (t - z)
else if (y <= 2150000000.0d0) then
tmp = (x / (z - t)) / z
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4600.0) {
tmp = (x / y) / (t - z);
} else if (y <= 2150000000.0) {
tmp = (x / (z - t)) / z;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4600.0: tmp = (x / y) / (t - z) elif y <= 2150000000.0: tmp = (x / (z - t)) / z else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4600.0) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 2150000000.0) tmp = Float64(Float64(x / Float64(z - t)) / z); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4600.0) tmp = (x / y) / (t - z); elseif (y <= 2150000000.0) tmp = (x / (z - t)) / z; else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4600.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2150000000.0], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4600:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 2150000000:\\
\;\;\;\;\frac{\frac{x}{z - t}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -4600Initial program 89.1%
Taylor expanded in y around inf 85.8%
associate-/r*88.7%
Simplified88.7%
if -4600 < y < 2.15e9Initial program 89.0%
associate-/l/98.2%
Simplified98.2%
Taylor expanded in y around 0 83.5%
neg-mul-183.5%
Simplified83.5%
if 2.15e9 < y Initial program 86.9%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in t around inf 50.3%
Final simplification75.2%
(FPCore (x y z t) :precision binary64 (if (<= t -2.25e-116) (/ (/ x y) (- t z)) (if (<= t 7.2e+21) (/ (/ x (- z y)) z) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.25e-116) {
tmp = (x / y) / (t - z);
} else if (t <= 7.2e+21) {
tmp = (x / (z - y)) / z;
} else {
tmp = (x / t) / (y - 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 (t <= (-2.25d-116)) then
tmp = (x / y) / (t - z)
else if (t <= 7.2d+21) then
tmp = (x / (z - y)) / z
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.25e-116) {
tmp = (x / y) / (t - z);
} else if (t <= 7.2e+21) {
tmp = (x / (z - y)) / z;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.25e-116: tmp = (x / y) / (t - z) elif t <= 7.2e+21: tmp = (x / (z - y)) / z else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.25e-116) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 7.2e+21) tmp = Float64(Float64(x / Float64(z - y)) / z); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.25e-116) tmp = (x / y) / (t - z); elseif (t <= 7.2e+21) tmp = (x / (z - y)) / z; else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.25e-116], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+21], N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{z - y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.25000000000000006e-116Initial program 84.1%
Taylor expanded in y around inf 58.2%
associate-/r*62.6%
Simplified62.6%
if -2.25000000000000006e-116 < t < 7.2e21Initial program 91.0%
Taylor expanded in t around 0 76.6%
mul-1-neg76.6%
distribute-rgt-neg-in76.6%
neg-sub076.6%
sub-neg76.6%
+-commutative76.6%
associate--r+76.6%
neg-sub076.6%
remove-double-neg76.6%
Simplified76.6%
div-inv76.5%
associate-/r*77.7%
Applied egg-rr77.7%
*-commutative77.7%
associate-*l/84.4%
associate-*r/83.7%
associate-*l/83.7%
*-lft-identity83.7%
Simplified83.7%
if 7.2e21 < t Initial program 89.0%
associate-/l/98.3%
Simplified98.3%
Taylor expanded in t around inf 90.7%
(FPCore (x y z t) :precision binary64 (if (<= y -4.1e-28) (/ (/ x y) (- t z)) (if (<= y 3.8e-73) (/ x (* z (- z t))) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-28) {
tmp = (x / y) / (t - z);
} else if (y <= 3.8e-73) {
tmp = x / (z * (z - t));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.1d-28)) then
tmp = (x / y) / (t - z)
else if (y <= 3.8d-73) then
tmp = x / (z * (z - t))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-28) {
tmp = (x / y) / (t - z);
} else if (y <= 3.8e-73) {
tmp = x / (z * (z - t));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.1e-28: tmp = (x / y) / (t - z) elif y <= 3.8e-73: tmp = x / (z * (z - t)) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.1e-28) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 3.8e-73) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.1e-28) tmp = (x / y) / (t - z); elseif (y <= 3.8e-73) tmp = x / (z * (z - t)); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.1e-28], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-73], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-73}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -4.1000000000000002e-28Initial program 89.6%
Taylor expanded in y around inf 85.0%
associate-/r*87.8%
Simplified87.8%
if -4.1000000000000002e-28 < y < 3.8000000000000003e-73Initial program 88.3%
Taylor expanded in y around 0 74.7%
mul-1-neg74.7%
distribute-neg-frac274.7%
distribute-rgt-neg-in74.7%
sub-neg74.7%
+-commutative74.7%
distribute-neg-in74.7%
remove-double-neg74.7%
unsub-neg74.7%
Simplified74.7%
if 3.8000000000000003e-73 < y Initial program 87.7%
associate-/l/97.8%
Simplified97.8%
Taylor expanded in t around inf 50.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -0.0028) (not (<= z 1.05e-90))) (/ x (* z (- t))) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.0028) || !(z <= 1.05e-90)) {
tmp = x / (z * -t);
} else {
tmp = x / (y * 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 ((z <= (-0.0028d0)) .or. (.not. (z <= 1.05d-90))) then
tmp = x / (z * -t)
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.0028) || !(z <= 1.05e-90)) {
tmp = x / (z * -t);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -0.0028) or not (z <= 1.05e-90): tmp = x / (z * -t) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -0.0028) || !(z <= 1.05e-90)) tmp = Float64(x / Float64(z * Float64(-t))); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -0.0028) || ~((z <= 1.05e-90))) tmp = x / (z * -t); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.0028], N[Not[LessEqual[z, 1.05e-90]], $MachinePrecision]], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0028 \lor \neg \left(z \leq 1.05 \cdot 10^{-90}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -0.00279999999999999997 or 1.05e-90 < z Initial program 83.9%
associate-/l/99.8%
clear-num99.5%
inv-pow99.5%
div-inv99.4%
clear-num99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in t around inf 37.9%
associate-/l*50.7%
Simplified50.7%
Taylor expanded in y around 0 34.3%
mul-1-neg34.3%
distribute-neg-frac234.3%
mul-1-neg34.3%
associate-*r*34.3%
neg-mul-134.3%
Simplified34.3%
if -0.00279999999999999997 < z < 1.05e-90Initial program 96.6%
Taylor expanded in z around 0 70.5%
Final simplification47.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.16e+67) (not (<= z 7.8e+84))) (/ (/ x z) y) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.16e+67) || !(z <= 7.8e+84)) {
tmp = (x / z) / y;
} else {
tmp = x / (y * 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 ((z <= (-1.16d+67)) .or. (.not. (z <= 7.8d+84))) then
tmp = (x / z) / y
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.16e+67) || !(z <= 7.8e+84)) {
tmp = (x / z) / y;
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.16e+67) or not (z <= 7.8e+84): tmp = (x / z) / y else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.16e+67) || !(z <= 7.8e+84)) tmp = Float64(Float64(x / z) / y); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.16e+67) || ~((z <= 7.8e+84))) tmp = (x / z) / y; else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.16e+67], N[Not[LessEqual[z, 7.8e+84]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+67} \lor \neg \left(z \leq 7.8 \cdot 10^{+84}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -1.15999999999999994e67 or 7.80000000000000032e84 < z Initial program 79.3%
Taylor expanded in t around 0 77.7%
mul-1-neg77.7%
distribute-rgt-neg-in77.7%
neg-sub077.7%
sub-neg77.7%
+-commutative77.7%
associate--r+77.7%
neg-sub077.7%
remove-double-neg77.7%
Simplified77.7%
Taylor expanded in z around 0 47.1%
associate-*r/47.1%
neg-mul-147.1%
Simplified47.1%
div-inv47.1%
add-sqr-sqrt23.2%
sqrt-unprod47.5%
sqr-neg47.5%
sqrt-unprod23.0%
add-sqr-sqrt45.1%
associate-/r*45.0%
Applied egg-rr45.0%
*-commutative45.0%
associate-*l/40.5%
associate-*r/46.2%
associate-*l/46.2%
*-lft-identity46.2%
Simplified46.2%
if -1.15999999999999994e67 < z < 7.80000000000000032e84Initial program 94.7%
Taylor expanded in z around 0 49.7%
Final simplification48.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.4e+66) (not (<= z 4.8e+76))) (/ x (* y z)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.4e+66) || !(z <= 4.8e+76)) {
tmp = x / (y * z);
} else {
tmp = x / (y * 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 ((z <= (-6.4d+66)) .or. (.not. (z <= 4.8d+76))) then
tmp = x / (y * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.4e+66) || !(z <= 4.8e+76)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.4e+66) or not (z <= 4.8e+76): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.4e+66) || !(z <= 4.8e+76)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6.4e+66) || ~((z <= 4.8e+76))) tmp = x / (y * z); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.4e+66], N[Not[LessEqual[z, 4.8e+76]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+66} \lor \neg \left(z \leq 4.8 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -6.3999999999999999e66 or 4.8e76 < z Initial program 79.3%
Taylor expanded in t around 0 77.7%
mul-1-neg77.7%
distribute-rgt-neg-in77.7%
neg-sub077.7%
sub-neg77.7%
+-commutative77.7%
associate--r+77.7%
neg-sub077.7%
remove-double-neg77.7%
Simplified77.7%
Taylor expanded in z around 0 47.1%
associate-*r/47.1%
neg-mul-147.1%
Simplified47.1%
*-un-lft-identity47.1%
*-commutative47.1%
add-sqr-sqrt23.2%
sqrt-unprod47.5%
sqr-neg47.5%
sqrt-unprod23.0%
add-sqr-sqrt45.1%
associate-/r*40.5%
Applied egg-rr40.5%
*-rgt-identity40.5%
associate-/r*45.1%
Simplified45.1%
if -6.3999999999999999e66 < z < 4.8e76Initial program 94.7%
Taylor expanded in z around 0 49.7%
Final simplification47.8%
(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(Float64(x / 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[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 88.4%
associate-/l/98.0%
Simplified98.0%
(FPCore (x y z t) :precision binary64 (/ x (* y t)))
double code(double x, double y, double z, double t) {
return x / (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 * t)
end function
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
def code(x, y, z, t): return x / (y * t)
function code(x, y, z, t) return Float64(x / Float64(y * t)) end
function tmp = code(x, y, z, t) tmp = x / (y * t); end
code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 88.4%
Taylor expanded in z around 0 36.1%
Final simplification36.1%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t\_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024111
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))