
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
return 1.0 - (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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t): return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t) return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) end
function tmp = code(x, y, z, t) tmp = 1.0 - (x / ((y - z) * (y - t))); end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
return 1.0 - (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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t): return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t) return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) end
function tmp = code(x, y, z, t) tmp = 1.0 - (x / ((y - z) * (y - t))); end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
return 1.0 - (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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t): return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t) return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) end
function tmp = code(x, y, z, t) tmp = 1.0 - (x / ((y - z) * (y - t))); end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
Initial program 99.2%
Final simplification99.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.32e-150)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z -5.1e-291)
(- 1.0 (/ (/ x y) y))
(if (<= z 3.25e-124)
(+ 1.0 (/ (/ x t) y))
(+ 1.0 (/ -1.0 (* z (/ t x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.32e-150) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -5.1e-291) {
tmp = 1.0 - ((x / y) / y);
} else if (z <= 3.25e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / 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 <= (-2.32d-150)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= (-5.1d-291)) then
tmp = 1.0d0 - ((x / y) / y)
else if (z <= 3.25d-124) then
tmp = 1.0d0 + ((x / t) / y)
else
tmp = 1.0d0 + ((-1.0d0) / (z * (t / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.32e-150) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -5.1e-291) {
tmp = 1.0 - ((x / y) / y);
} else if (z <= 3.25e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / x)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.32e-150: tmp = 1.0 + ((x / z) / (y - t)) elif z <= -5.1e-291: tmp = 1.0 - ((x / y) / y) elif z <= 3.25e-124: tmp = 1.0 + ((x / t) / y) else: tmp = 1.0 + (-1.0 / (z * (t / x))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.32e-150) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= -5.1e-291) tmp = Float64(1.0 - Float64(Float64(x / y) / y)); elseif (z <= 3.25e-124) tmp = Float64(1.0 + Float64(Float64(x / t) / y)); else tmp = Float64(1.0 + Float64(-1.0 / Float64(z * Float64(t / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.32e-150) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= -5.1e-291) tmp = 1.0 - ((x / y) / y); elseif (z <= 3.25e-124) tmp = 1.0 + ((x / t) / y); else tmp = 1.0 + (-1.0 / (z * (t / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.32e-150], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.1e-291], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.25e-124], N[(1.0 + N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(z * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.32 \cdot 10^{-150}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-291}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{-124}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\
\end{array}
\end{array}
if z < -2.3200000000000001e-150Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
associate-/r*100.0%
associate-*r/100.0%
metadata-eval100.0%
times-frac100.0%
neg-mul-1100.0%
remove-double-neg100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 96.4%
if -2.3200000000000001e-150 < z < -5.1e-291Initial program 100.0%
associate-/l/99.7%
clear-num99.8%
inv-pow99.8%
div-inv99.8%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in z around 0 89.3%
associate-/r*89.1%
Simplified89.1%
Taylor expanded in y around inf 68.6%
if -5.1e-291 < z < 3.24999999999999994e-124Initial program 95.0%
associate-/l/99.9%
clear-num99.8%
inv-pow99.8%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in z around 0 82.8%
associate-/r*85.3%
Simplified85.3%
Taylor expanded in y around 0 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if 3.24999999999999994e-124 < z Initial program 99.8%
associate-/l/98.7%
clear-num98.7%
inv-pow98.7%
div-inv98.7%
clear-num98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in y around 0 69.5%
*-commutative69.5%
associate-*r/68.3%
Simplified68.3%
Final simplification79.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.6e-150)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z -2.9e-294)
(+ 1.0 (/ -1.0 (/ (* y y) x)))
(if (<= z 3.4e-124)
(+ 1.0 (/ (/ x t) y))
(+ 1.0 (/ -1.0 (* z (/ t x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.6e-150) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -2.9e-294) {
tmp = 1.0 + (-1.0 / ((y * y) / x));
} else if (z <= 3.4e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / 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 <= (-1.6d-150)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= (-2.9d-294)) then
tmp = 1.0d0 + ((-1.0d0) / ((y * y) / x))
else if (z <= 3.4d-124) then
tmp = 1.0d0 + ((x / t) / y)
else
tmp = 1.0d0 + ((-1.0d0) / (z * (t / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.6e-150) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -2.9e-294) {
tmp = 1.0 + (-1.0 / ((y * y) / x));
} else if (z <= 3.4e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / x)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.6e-150: tmp = 1.0 + ((x / z) / (y - t)) elif z <= -2.9e-294: tmp = 1.0 + (-1.0 / ((y * y) / x)) elif z <= 3.4e-124: tmp = 1.0 + ((x / t) / y) else: tmp = 1.0 + (-1.0 / (z * (t / x))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.6e-150) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= -2.9e-294) tmp = Float64(1.0 + Float64(-1.0 / Float64(Float64(y * y) / x))); elseif (z <= 3.4e-124) tmp = Float64(1.0 + Float64(Float64(x / t) / y)); else tmp = Float64(1.0 + Float64(-1.0 / Float64(z * Float64(t / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.6e-150) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= -2.9e-294) tmp = 1.0 + (-1.0 / ((y * y) / x)); elseif (z <= 3.4e-124) tmp = 1.0 + ((x / t) / y); else tmp = 1.0 + (-1.0 / (z * (t / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.6e-150], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.9e-294], N[(1.0 + N[(-1.0 / N[(N[(y * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-124], N[(1.0 + N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(z * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-150}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-294}:\\
\;\;\;\;1 + \frac{-1}{\frac{y \cdot y}{x}}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-124}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\
\end{array}
\end{array}
if z < -1.5999999999999999e-150Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
associate-/r*100.0%
associate-*r/100.0%
metadata-eval100.0%
times-frac100.0%
neg-mul-1100.0%
remove-double-neg100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 96.4%
if -1.5999999999999999e-150 < z < -2.9000000000000001e-294Initial program 100.0%
associate-/l/99.8%
clear-num99.8%
inv-pow99.8%
div-inv99.8%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in y around inf 67.7%
unpow267.7%
Simplified67.7%
if -2.9000000000000001e-294 < z < 3.4000000000000001e-124Initial program 94.7%
associate-/l/99.9%
clear-num99.8%
inv-pow99.8%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in z around 0 81.8%
associate-/r*84.5%
Simplified84.5%
Taylor expanded in y around 0 68.9%
associate-*r/68.9%
neg-mul-168.9%
Simplified68.9%
if 3.4000000000000001e-124 < z Initial program 99.8%
associate-/l/98.7%
clear-num98.7%
inv-pow98.7%
div-inv98.7%
clear-num98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in y around 0 69.5%
*-commutative69.5%
associate-*r/68.3%
Simplified68.3%
Final simplification79.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.2e-65)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z -4.9e-290)
(- 1.0 (/ x (* y (- y z))))
(if (<= z 1.65e-124)
(+ 1.0 (/ (/ x t) y))
(+ 1.0 (/ -1.0 (* z (/ t x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.2e-65) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -4.9e-290) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (z <= 1.65e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / 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.2d-65)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= (-4.9d-290)) then
tmp = 1.0d0 - (x / (y * (y - z)))
else if (z <= 1.65d-124) then
tmp = 1.0d0 + ((x / t) / y)
else
tmp = 1.0d0 + ((-1.0d0) / (z * (t / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.2e-65) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -4.9e-290) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (z <= 1.65e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / x)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.2e-65: tmp = 1.0 + ((x / z) / (y - t)) elif z <= -4.9e-290: tmp = 1.0 - (x / (y * (y - z))) elif z <= 1.65e-124: tmp = 1.0 + ((x / t) / y) else: tmp = 1.0 + (-1.0 / (z * (t / x))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.2e-65) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= -4.9e-290) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - z)))); elseif (z <= 1.65e-124) tmp = Float64(1.0 + Float64(Float64(x / t) / y)); else tmp = Float64(1.0 + Float64(-1.0 / Float64(z * Float64(t / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.2e-65) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= -4.9e-290) tmp = 1.0 - (x / (y * (y - z))); elseif (z <= 1.65e-124) tmp = 1.0 + ((x / t) / y); else tmp = 1.0 + (-1.0 / (z * (t / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.2e-65], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.9e-290], N[(1.0 - N[(x / N[(y * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-124], N[(1.0 + N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(z * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-65}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-290}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-124}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\
\end{array}
\end{array}
if z < -6.20000000000000032e-65Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
associate-/r*99.9%
associate-*r/99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
remove-double-neg99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in z around inf 98.9%
if -6.20000000000000032e-65 < z < -4.9000000000000001e-290Initial program 100.0%
Taylor expanded in t around 0 71.6%
if -4.9000000000000001e-290 < z < 1.64999999999999992e-124Initial program 95.0%
associate-/l/99.9%
clear-num99.8%
inv-pow99.8%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in z around 0 82.8%
associate-/r*85.3%
Simplified85.3%
Taylor expanded in y around 0 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if 1.64999999999999992e-124 < z Initial program 99.8%
associate-/l/98.7%
clear-num98.7%
inv-pow98.7%
div-inv98.7%
clear-num98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in y around 0 69.5%
*-commutative69.5%
associate-*r/68.3%
Simplified68.3%
Final simplification79.7%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.75e-150)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z -5e-290)
(- 1.0 (/ (/ x y) y))
(if (<= z 3.4e-124) (+ 1.0 (/ (/ x t) y)) (- 1.0 (/ (/ x t) z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.75e-150) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -5e-290) {
tmp = 1.0 - ((x / y) / y);
} else if (z <= 3.4e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 - ((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) :: tmp
if (z <= (-1.75d-150)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= (-5d-290)) then
tmp = 1.0d0 - ((x / y) / y)
else if (z <= 3.4d-124) then
tmp = 1.0d0 + ((x / t) / y)
else
tmp = 1.0d0 - ((x / 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.75e-150) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= -5e-290) {
tmp = 1.0 - ((x / y) / y);
} else if (z <= 3.4e-124) {
tmp = 1.0 + ((x / t) / y);
} else {
tmp = 1.0 - ((x / t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.75e-150: tmp = 1.0 + ((x / z) / (y - t)) elif z <= -5e-290: tmp = 1.0 - ((x / y) / y) elif z <= 3.4e-124: tmp = 1.0 + ((x / t) / y) else: tmp = 1.0 - ((x / t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.75e-150) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= -5e-290) tmp = Float64(1.0 - Float64(Float64(x / y) / y)); elseif (z <= 3.4e-124) tmp = Float64(1.0 + Float64(Float64(x / t) / y)); else tmp = Float64(1.0 - Float64(Float64(x / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.75e-150) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= -5e-290) tmp = 1.0 - ((x / y) / y); elseif (z <= 3.4e-124) tmp = 1.0 + ((x / t) / y); else tmp = 1.0 - ((x / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.75e-150], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-290], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-124], N[(1.0 + N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-150}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-290}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-124}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{t}}{z}\\
\end{array}
\end{array}
if z < -1.7499999999999999e-150Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
associate-/r*100.0%
associate-*r/100.0%
metadata-eval100.0%
times-frac100.0%
neg-mul-1100.0%
remove-double-neg100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 96.4%
if -1.7499999999999999e-150 < z < -5.0000000000000001e-290Initial program 100.0%
associate-/l/99.7%
clear-num99.8%
inv-pow99.8%
div-inv99.8%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in z around 0 89.3%
associate-/r*89.1%
Simplified89.1%
Taylor expanded in y around inf 68.6%
if -5.0000000000000001e-290 < z < 3.4000000000000001e-124Initial program 95.0%
associate-/l/99.9%
clear-num99.8%
inv-pow99.8%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in z around 0 82.8%
associate-/r*85.3%
Simplified85.3%
Taylor expanded in y around 0 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if 3.4000000000000001e-124 < z Initial program 99.8%
associate-/l/98.7%
clear-num98.7%
inv-pow98.7%
div-inv98.7%
clear-num98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in y around 0 69.5%
associate-/r*68.4%
Simplified68.4%
Final simplification79.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.9e-90)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z 3.4e-124)
(- 1.0 (/ x (* y (- y t))))
(+ 1.0 (/ -1.0 (* z (/ t x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.9e-90) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 3.4e-124) {
tmp = 1.0 - (x / (y * (y - t)));
} else {
tmp = 1.0 + (-1.0 / (z * (t / 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 <= (-2.9d-90)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= 3.4d-124) then
tmp = 1.0d0 - (x / (y * (y - t)))
else
tmp = 1.0d0 + ((-1.0d0) / (z * (t / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.9e-90) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 3.4e-124) {
tmp = 1.0 - (x / (y * (y - t)));
} else {
tmp = 1.0 + (-1.0 / (z * (t / x)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.9e-90: tmp = 1.0 + ((x / z) / (y - t)) elif z <= 3.4e-124: tmp = 1.0 - (x / (y * (y - t))) else: tmp = 1.0 + (-1.0 / (z * (t / x))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.9e-90) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 3.4e-124) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - t)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(z * Float64(t / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.9e-90) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= 3.4e-124) tmp = 1.0 - (x / (y * (y - t))); else tmp = 1.0 + (-1.0 / (z * (t / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.9e-90], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-124], N[(1.0 - N[(x / N[(y * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(z * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-90}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-124}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\
\end{array}
\end{array}
if z < -2.89999999999999983e-90Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
associate-/r*100.0%
associate-*r/100.0%
metadata-eval100.0%
times-frac100.0%
neg-mul-1100.0%
remove-double-neg100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 98.2%
if -2.89999999999999983e-90 < z < 3.4000000000000001e-124Initial program 97.5%
Taylor expanded in z around 0 86.4%
if 3.4000000000000001e-124 < z Initial program 99.8%
associate-/l/98.7%
clear-num98.7%
inv-pow98.7%
div-inv98.7%
clear-num98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in y around 0 69.5%
*-commutative69.5%
associate-*r/68.3%
Simplified68.3%
Final simplification85.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.15e-94)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z 3.7e-125)
(- 1.0 (/ (/ x (- y t)) y))
(+ 1.0 (/ -1.0 (* z (/ t x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.15e-94) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 3.7e-125) {
tmp = 1.0 - ((x / (y - t)) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / 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 <= (-1.15d-94)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= 3.7d-125) then
tmp = 1.0d0 - ((x / (y - t)) / y)
else
tmp = 1.0d0 + ((-1.0d0) / (z * (t / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.15e-94) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 3.7e-125) {
tmp = 1.0 - ((x / (y - t)) / y);
} else {
tmp = 1.0 + (-1.0 / (z * (t / x)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.15e-94: tmp = 1.0 + ((x / z) / (y - t)) elif z <= 3.7e-125: tmp = 1.0 - ((x / (y - t)) / y) else: tmp = 1.0 + (-1.0 / (z * (t / x))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.15e-94) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 3.7e-125) tmp = Float64(1.0 - Float64(Float64(x / Float64(y - t)) / y)); else tmp = Float64(1.0 + Float64(-1.0 / Float64(z * Float64(t / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.15e-94) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= 3.7e-125) tmp = 1.0 - ((x / (y - t)) / y); else tmp = 1.0 + (-1.0 / (z * (t / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.15e-94], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-125], N[(1.0 - N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(z * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-94}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-125}:\\
\;\;\;\;1 - \frac{\frac{x}{y - t}}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\
\end{array}
\end{array}
if z < -1.15e-94Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
associate-/r*100.0%
associate-*r/100.0%
metadata-eval100.0%
times-frac100.0%
neg-mul-1100.0%
remove-double-neg100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 98.2%
if -1.15e-94 < z < 3.6999999999999999e-125Initial program 97.5%
associate-/l/99.8%
clear-num99.8%
inv-pow99.8%
div-inv99.8%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in z around 0 86.4%
associate-/r*87.6%
Simplified87.6%
if 3.6999999999999999e-125 < z Initial program 99.8%
associate-/l/98.7%
clear-num98.7%
inv-pow98.7%
div-inv98.7%
clear-num98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in y around 0 69.5%
*-commutative69.5%
associate-*r/68.3%
Simplified68.3%
Final simplification85.8%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.2e-191)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= t 1.12e-63)
(- 1.0 (/ x (* y (- y z))))
(+ 1.0 (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.2e-191) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.12e-63) {
tmp = 1.0 - (x / (y * (y - z)));
} else {
tmp = 1.0 + ((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 <= (-1.2d-191)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (t <= 1.12d-63) then
tmp = 1.0d0 - (x / (y * (y - z)))
else
tmp = 1.0d0 + ((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 <= -1.2e-191) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.12e-63) {
tmp = 1.0 - (x / (y * (y - z)));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.2e-191: tmp = 1.0 + ((x / z) / (y - t)) elif t <= 1.12e-63: tmp = 1.0 - (x / (y * (y - z))) else: tmp = 1.0 + ((x / t) / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.2e-191) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (t <= 1.12e-63) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - z)))); else tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.2e-191) tmp = 1.0 + ((x / z) / (y - t)); elseif (t <= 1.12e-63) tmp = 1.0 - (x / (y * (y - z))); else tmp = 1.0 + ((x / t) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.2e-191], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e-63], N[(1.0 - N[(x / N[(y * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-191}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-63}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.2e-191Initial program 98.9%
sub-neg98.9%
distribute-frac-neg98.9%
*-lft-identity98.9%
associate-/r*95.8%
associate-*r/95.8%
metadata-eval95.8%
times-frac95.8%
neg-mul-195.8%
remove-double-neg95.8%
neg-mul-195.8%
sub-neg95.8%
+-commutative95.8%
distribute-neg-out95.8%
remove-double-neg95.8%
sub-neg95.8%
Simplified95.8%
Taylor expanded in z around inf 79.0%
if -1.2e-191 < t < 1.12000000000000002e-63Initial program 98.7%
Taylor expanded in t around 0 89.6%
if 1.12000000000000002e-63 < t Initial program 99.9%
Taylor expanded in t around inf 98.8%
mul-1-neg98.8%
associate-/r*98.8%
distribute-neg-frac98.8%
distribute-frac-neg98.8%
Simplified98.8%
Final simplification88.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4.6e-75) (not (<= t 8e-43))) (- 1.0 (/ x (* z t))) (+ 1.0 (/ x (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.6e-75) || !(t <= 8e-43)) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 + (x / (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 <= (-4.6d-75)) .or. (.not. (t <= 8d-43))) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0 + (x / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.6e-75) || !(t <= 8e-43)) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 + (x / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4.6e-75) or not (t <= 8e-43): tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 + (x / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4.6e-75) || !(t <= 8e-43)) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = Float64(1.0 + Float64(x / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -4.6e-75) || ~((t <= 8e-43))) tmp = 1.0 - (x / (z * t)); else tmp = 1.0 + (x / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4.6e-75], N[Not[LessEqual[t, 8e-43]], $MachinePrecision]], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-75} \lor \neg \left(t \leq 8 \cdot 10^{-43}\right):\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{y \cdot z}\\
\end{array}
\end{array}
if t < -4.6e-75 or 8.00000000000000062e-43 < t Initial program 99.9%
Taylor expanded in y around 0 80.8%
if -4.6e-75 < t < 8.00000000000000062e-43Initial program 98.2%
sub-neg98.2%
distribute-frac-neg98.2%
*-lft-identity98.2%
associate-/r*99.9%
associate-*r/99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
remove-double-neg99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in z around inf 73.5%
Taylor expanded in y around inf 66.2%
Final simplification74.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.5e-54) (not (<= y 9.6e-29))) (- 1.0 (/ x (* y y))) (- 1.0 (/ x (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-54) || !(y <= 9.6e-29)) {
tmp = 1.0 - (x / (y * y));
} else {
tmp = 1.0 - (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 ((y <= (-3.5d-54)) .or. (.not. (y <= 9.6d-29))) then
tmp = 1.0d0 - (x / (y * y))
else
tmp = 1.0d0 - (x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-54) || !(y <= 9.6e-29)) {
tmp = 1.0 - (x / (y * y));
} else {
tmp = 1.0 - (x / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.5e-54) or not (y <= 9.6e-29): tmp = 1.0 - (x / (y * y)) else: tmp = 1.0 - (x / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.5e-54) || !(y <= 9.6e-29)) tmp = Float64(1.0 - Float64(x / Float64(y * y))); else tmp = Float64(1.0 - Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.5e-54) || ~((y <= 9.6e-29))) tmp = 1.0 - (x / (y * y)); else tmp = 1.0 - (x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.5e-54], N[Not[LessEqual[y, 9.6e-29]], $MachinePrecision]], N[(1.0 - N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-54} \lor \neg \left(y \leq 9.6 \cdot 10^{-29}\right):\\
\;\;\;\;1 - \frac{x}{y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -3.49999999999999982e-54 or 9.59999999999999968e-29 < y Initial program 99.9%
Taylor expanded in y around inf 89.1%
unpow289.1%
Simplified89.1%
if -3.49999999999999982e-54 < y < 9.59999999999999968e-29Initial program 98.2%
Taylor expanded in y around 0 74.7%
Final simplification82.7%
(FPCore (x y z t) :precision binary64 (if (<= y -3.2e-53) (- 1.0 (/ x (* y y))) (if (<= y 1.85e-28) (- 1.0 (/ x (* z t))) (- 1.0 (/ (/ x y) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e-53) {
tmp = 1.0 - (x / (y * y));
} else if (y <= 1.85e-28) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - ((x / y) / 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 <= (-3.2d-53)) then
tmp = 1.0d0 - (x / (y * y))
else if (y <= 1.85d-28) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0 - ((x / y) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e-53) {
tmp = 1.0 - (x / (y * y));
} else if (y <= 1.85e-28) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - ((x / y) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e-53: tmp = 1.0 - (x / (y * y)) elif y <= 1.85e-28: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 - ((x / y) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e-53) tmp = Float64(1.0 - Float64(x / Float64(y * y))); elseif (y <= 1.85e-28) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = Float64(1.0 - Float64(Float64(x / y) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2e-53) tmp = 1.0 - (x / (y * y)); elseif (y <= 1.85e-28) tmp = 1.0 - (x / (z * t)); else tmp = 1.0 - ((x / y) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e-53], N[(1.0 - N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e-28], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-53}:\\
\;\;\;\;1 - \frac{x}{y \cdot y}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-28}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -3.2000000000000001e-53Initial program 100.0%
Taylor expanded in y around inf 88.7%
unpow288.7%
Simplified88.7%
if -3.2000000000000001e-53 < y < 1.8500000000000001e-28Initial program 98.2%
Taylor expanded in y around 0 74.7%
if 1.8500000000000001e-28 < y Initial program 99.9%
associate-/l/100.0%
clear-num100.0%
inv-pow100.0%
div-inv99.9%
clear-num100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Taylor expanded in z around 0 97.3%
associate-/r*97.3%
Simplified97.3%
Taylor expanded in y around inf 89.5%
Final simplification82.7%
(FPCore (x y z t) :precision binary64 (+ 1.0 (/ (/ x (- z y)) (- y t))))
double code(double x, double y, double z, double t) {
return 1.0 + ((x / (z - y)) / (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 = 1.0d0 + ((x / (z - y)) / (y - t))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 + ((x / (z - y)) / (y - t));
}
def code(x, y, z, t): return 1.0 + ((x / (z - y)) / (y - t))
function code(x, y, z, t) return Float64(1.0 + Float64(Float64(x / Float64(z - y)) / Float64(y - t))) end
function tmp = code(x, y, z, t) tmp = 1.0 + ((x / (z - y)) / (y - t)); end
code[x_, y_, z_, t_] := N[(1.0 + N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{\frac{x}{z - y}}{y - t}
\end{array}
Initial program 99.2%
sub-neg99.2%
distribute-frac-neg99.2%
*-lft-identity99.2%
associate-/r*97.7%
associate-*r/97.7%
metadata-eval97.7%
times-frac97.7%
neg-mul-197.7%
remove-double-neg97.7%
neg-mul-197.7%
sub-neg97.7%
+-commutative97.7%
distribute-neg-out97.7%
remove-double-neg97.7%
sub-neg97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t) :precision binary64 (+ 1.0 (/ x (* y z))))
double code(double x, double y, double z, double t) {
return 1.0 + (x / (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 = 1.0d0 + (x / (y * z))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 + (x / (y * z));
}
def code(x, y, z, t): return 1.0 + (x / (y * z))
function code(x, y, z, t) return Float64(1.0 + Float64(x / Float64(y * z))) end
function tmp = code(x, y, z, t) tmp = 1.0 + (x / (y * z)); end
code[x_, y_, z_, t_] := N[(1.0 + N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{x}{y \cdot z}
\end{array}
Initial program 99.2%
sub-neg99.2%
distribute-frac-neg99.2%
*-lft-identity99.2%
associate-/r*97.7%
associate-*r/97.7%
metadata-eval97.7%
times-frac97.7%
neg-mul-197.7%
remove-double-neg97.7%
neg-mul-197.7%
sub-neg97.7%
+-commutative97.7%
distribute-neg-out97.7%
remove-double-neg97.7%
sub-neg97.7%
Simplified97.7%
Taylor expanded in z around inf 78.0%
Taylor expanded in y around inf 59.0%
Final simplification59.0%
herbie shell --seed 2023274
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
:precision binary64
(- 1.0 (/ x (* (- y z) (- y t)))))