
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y / a) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 93.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in y around 0 93.3%
associate-*l/98.4%
*-commutative98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z) a))))
(if (<= z -8e+23)
t_1
(if (<= z -9e-78)
(/ t (/ a y))
(if (<= z 1.04e-81)
x
(if (<= z 2.6e+95) (* t (/ y a)) (if (<= z 6.2e+135) x t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-z / a);
double tmp;
if (z <= -8e+23) {
tmp = t_1;
} else if (z <= -9e-78) {
tmp = t / (a / y);
} else if (z <= 1.04e-81) {
tmp = x;
} else if (z <= 2.6e+95) {
tmp = t * (y / a);
} else if (z <= 6.2e+135) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (-z / a)
if (z <= (-8d+23)) then
tmp = t_1
else if (z <= (-9d-78)) then
tmp = t / (a / y)
else if (z <= 1.04d-81) then
tmp = x
else if (z <= 2.6d+95) then
tmp = t * (y / a)
else if (z <= 6.2d+135) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-z / a);
double tmp;
if (z <= -8e+23) {
tmp = t_1;
} else if (z <= -9e-78) {
tmp = t / (a / y);
} else if (z <= 1.04e-81) {
tmp = x;
} else if (z <= 2.6e+95) {
tmp = t * (y / a);
} else if (z <= 6.2e+135) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (-z / a) tmp = 0 if z <= -8e+23: tmp = t_1 elif z <= -9e-78: tmp = t / (a / y) elif z <= 1.04e-81: tmp = x elif z <= 2.6e+95: tmp = t * (y / a) elif z <= 6.2e+135: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(-z) / a)) tmp = 0.0 if (z <= -8e+23) tmp = t_1; elseif (z <= -9e-78) tmp = Float64(t / Float64(a / y)); elseif (z <= 1.04e-81) tmp = x; elseif (z <= 2.6e+95) tmp = Float64(t * Float64(y / a)); elseif (z <= 6.2e+135) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (-z / a); tmp = 0.0; if (z <= -8e+23) tmp = t_1; elseif (z <= -9e-78) tmp = t / (a / y); elseif (z <= 1.04e-81) tmp = x; elseif (z <= 2.6e+95) tmp = t * (y / a); elseif (z <= 6.2e+135) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+23], t$95$1, If[LessEqual[z, -9e-78], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.04e-81], x, If[LessEqual[z, 2.6e+95], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+135], x, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-z}{a}\\
\mathbf{if}\;z \leq -8 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-78}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.04 \cdot 10^{-81}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+135}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.9999999999999993e23 or 6.20000000000000044e135 < z Initial program 88.9%
sub-neg88.9%
distribute-frac-neg288.9%
+-commutative88.9%
associate-/l*91.1%
fma-define91.1%
distribute-frac-neg291.1%
distribute-neg-frac91.1%
sub-neg91.1%
distribute-neg-in91.1%
remove-double-neg91.1%
+-commutative91.1%
sub-neg91.1%
Simplified91.1%
Taylor expanded in z around inf 63.6%
mul-1-neg63.6%
associate-/l*65.9%
distribute-rgt-neg-in65.9%
distribute-neg-frac265.9%
Simplified65.9%
if -7.9999999999999993e23 < z < -9e-78Initial program 95.0%
sub-neg95.0%
distribute-frac-neg295.0%
+-commutative95.0%
associate-/l*85.6%
fma-define85.6%
distribute-frac-neg285.6%
distribute-neg-frac85.6%
sub-neg85.6%
distribute-neg-in85.6%
remove-double-neg85.6%
+-commutative85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in t around inf 61.0%
*-commutative61.0%
associate-/l*51.5%
Simplified51.5%
Taylor expanded in y around 0 61.0%
associate-/l*65.6%
Simplified65.6%
clear-num65.7%
div-inv65.8%
Applied egg-rr65.8%
if -9e-78 < z < 1.04e-81 or 2.5999999999999999e95 < z < 6.20000000000000044e135Initial program 95.7%
sub-neg95.7%
distribute-frac-neg295.7%
+-commutative95.7%
associate-/l*95.0%
fma-define95.0%
distribute-frac-neg295.0%
distribute-neg-frac95.0%
sub-neg95.0%
distribute-neg-in95.0%
remove-double-neg95.0%
+-commutative95.0%
sub-neg95.0%
Simplified95.0%
Taylor expanded in y around 0 59.8%
if 1.04e-81 < z < 2.5999999999999999e95Initial program 94.8%
sub-neg94.8%
distribute-frac-neg294.8%
+-commutative94.8%
associate-/l*94.6%
fma-define94.7%
distribute-frac-neg294.7%
distribute-neg-frac94.7%
sub-neg94.7%
distribute-neg-in94.7%
remove-double-neg94.7%
+-commutative94.7%
sub-neg94.7%
Simplified94.7%
Taylor expanded in t around inf 45.0%
*-commutative45.0%
associate-/l*45.0%
Simplified45.0%
Taylor expanded in y around 0 45.0%
associate-/l*50.0%
Simplified50.0%
Final simplification60.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.35e+18)
(/ y (/ a (- z)))
(if (<= z -4.2e-79)
(/ t (/ a y))
(if (<= z 2.9e-81)
x
(if (<= z 3.1e+95)
(* t (/ y a))
(if (<= z 5.5e+135) x (* y (/ (- z) a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.35e+18) {
tmp = y / (a / -z);
} else if (z <= -4.2e-79) {
tmp = t / (a / y);
} else if (z <= 2.9e-81) {
tmp = x;
} else if (z <= 3.1e+95) {
tmp = t * (y / a);
} else if (z <= 5.5e+135) {
tmp = x;
} else {
tmp = y * (-z / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.35d+18)) then
tmp = y / (a / -z)
else if (z <= (-4.2d-79)) then
tmp = t / (a / y)
else if (z <= 2.9d-81) then
tmp = x
else if (z <= 3.1d+95) then
tmp = t * (y / a)
else if (z <= 5.5d+135) then
tmp = x
else
tmp = y * (-z / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.35e+18) {
tmp = y / (a / -z);
} else if (z <= -4.2e-79) {
tmp = t / (a / y);
} else if (z <= 2.9e-81) {
tmp = x;
} else if (z <= 3.1e+95) {
tmp = t * (y / a);
} else if (z <= 5.5e+135) {
tmp = x;
} else {
tmp = y * (-z / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.35e+18: tmp = y / (a / -z) elif z <= -4.2e-79: tmp = t / (a / y) elif z <= 2.9e-81: tmp = x elif z <= 3.1e+95: tmp = t * (y / a) elif z <= 5.5e+135: tmp = x else: tmp = y * (-z / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.35e+18) tmp = Float64(y / Float64(a / Float64(-z))); elseif (z <= -4.2e-79) tmp = Float64(t / Float64(a / y)); elseif (z <= 2.9e-81) tmp = x; elseif (z <= 3.1e+95) tmp = Float64(t * Float64(y / a)); elseif (z <= 5.5e+135) tmp = x; else tmp = Float64(y * Float64(Float64(-z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.35e+18) tmp = y / (a / -z); elseif (z <= -4.2e-79) tmp = t / (a / y); elseif (z <= 2.9e-81) tmp = x; elseif (z <= 3.1e+95) tmp = t * (y / a); elseif (z <= 5.5e+135) tmp = x; else tmp = y * (-z / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.35e+18], N[(y / N[(a / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-79], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-81], x, If[LessEqual[z, 3.1e+95], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+135], x, N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+18}:\\
\;\;\;\;\frac{y}{\frac{a}{-z}}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-81}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+135}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\end{array}
\end{array}
if z < -2.35e18Initial program 84.7%
sub-neg84.7%
distribute-frac-neg284.7%
+-commutative84.7%
associate-/l*91.5%
fma-define91.5%
distribute-frac-neg291.5%
distribute-neg-frac91.5%
sub-neg91.5%
distribute-neg-in91.5%
remove-double-neg91.5%
+-commutative91.5%
sub-neg91.5%
Simplified91.5%
Taylor expanded in z around inf 56.6%
mul-1-neg56.6%
associate-/l*60.0%
distribute-rgt-neg-in60.0%
distribute-neg-frac260.0%
Simplified60.0%
distribute-frac-neg260.0%
distribute-rgt-neg-in60.0%
clear-num60.0%
div-inv60.0%
distribute-neg-frac60.0%
Applied egg-rr60.0%
if -2.35e18 < z < -4.1999999999999999e-79Initial program 95.0%
sub-neg95.0%
distribute-frac-neg295.0%
+-commutative95.0%
associate-/l*85.6%
fma-define85.6%
distribute-frac-neg285.6%
distribute-neg-frac85.6%
sub-neg85.6%
distribute-neg-in85.6%
remove-double-neg85.6%
+-commutative85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in t around inf 61.0%
*-commutative61.0%
associate-/l*51.5%
Simplified51.5%
Taylor expanded in y around 0 61.0%
associate-/l*65.6%
Simplified65.6%
clear-num65.7%
div-inv65.8%
Applied egg-rr65.8%
if -4.1999999999999999e-79 < z < 2.89999999999999989e-81 or 3.1000000000000003e95 < z < 5.4999999999999999e135Initial program 95.7%
sub-neg95.7%
distribute-frac-neg295.7%
+-commutative95.7%
associate-/l*95.0%
fma-define95.0%
distribute-frac-neg295.0%
distribute-neg-frac95.0%
sub-neg95.0%
distribute-neg-in95.0%
remove-double-neg95.0%
+-commutative95.0%
sub-neg95.0%
Simplified95.0%
Taylor expanded in y around 0 59.8%
if 2.89999999999999989e-81 < z < 3.1000000000000003e95Initial program 94.8%
sub-neg94.8%
distribute-frac-neg294.8%
+-commutative94.8%
associate-/l*94.6%
fma-define94.7%
distribute-frac-neg294.7%
distribute-neg-frac94.7%
sub-neg94.7%
distribute-neg-in94.7%
remove-double-neg94.7%
+-commutative94.7%
sub-neg94.7%
Simplified94.7%
Taylor expanded in t around inf 45.0%
*-commutative45.0%
associate-/l*45.0%
Simplified45.0%
Taylor expanded in y around 0 45.0%
associate-/l*50.0%
Simplified50.0%
if 5.4999999999999999e135 < z Initial program 96.8%
sub-neg96.8%
distribute-frac-neg296.8%
+-commutative96.8%
associate-/l*90.5%
fma-define90.5%
distribute-frac-neg290.5%
distribute-neg-frac90.5%
sub-neg90.5%
distribute-neg-in90.5%
remove-double-neg90.5%
+-commutative90.5%
sub-neg90.5%
Simplified90.5%
Taylor expanded in z around inf 76.9%
mul-1-neg76.9%
associate-/l*77.1%
distribute-rgt-neg-in77.1%
distribute-neg-frac277.1%
Simplified77.1%
Final simplification60.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.4e+22)
(- x (* z (/ y a)))
(if (or (<= z 1.8e-105) (and (not (<= z 4.3e-17)) (<= z 6.2e+138)))
(+ x (* t (/ y a)))
(/ (* y (- t z)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+22) {
tmp = x - (z * (y / a));
} else if ((z <= 1.8e-105) || (!(z <= 4.3e-17) && (z <= 6.2e+138))) {
tmp = x + (t * (y / a));
} else {
tmp = (y * (t - z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.4d+22)) then
tmp = x - (z * (y / a))
else if ((z <= 1.8d-105) .or. (.not. (z <= 4.3d-17)) .and. (z <= 6.2d+138)) then
tmp = x + (t * (y / a))
else
tmp = (y * (t - z)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+22) {
tmp = x - (z * (y / a));
} else if ((z <= 1.8e-105) || (!(z <= 4.3e-17) && (z <= 6.2e+138))) {
tmp = x + (t * (y / a));
} else {
tmp = (y * (t - z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+22: tmp = x - (z * (y / a)) elif (z <= 1.8e-105) or (not (z <= 4.3e-17) and (z <= 6.2e+138)): tmp = x + (t * (y / a)) else: tmp = (y * (t - z)) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+22) tmp = Float64(x - Float64(z * Float64(y / a))); elseif ((z <= 1.8e-105) || (!(z <= 4.3e-17) && (z <= 6.2e+138))) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(Float64(y * Float64(t - z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.4e+22) tmp = x - (z * (y / a)); elseif ((z <= 1.8e-105) || (~((z <= 4.3e-17)) && (z <= 6.2e+138))) tmp = x + (t * (y / a)); else tmp = (y * (t - z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+22], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.8e-105], And[N[Not[LessEqual[z, 4.3e-17]], $MachinePrecision], LessEqual[z, 6.2e+138]]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+22}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-105} \lor \neg \left(z \leq 4.3 \cdot 10^{-17}\right) \land z \leq 6.2 \cdot 10^{+138}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(t - z\right)}{a}\\
\end{array}
\end{array}
if z < -1.4e22Initial program 84.7%
associate-/l*91.5%
Simplified91.5%
clear-num91.5%
un-div-inv91.5%
Applied egg-rr91.5%
Taylor expanded in z around inf 84.6%
associate-/r/92.8%
Applied egg-rr92.8%
if -1.4e22 < z < 1.79999999999999982e-105 or 4.30000000000000023e-17 < z < 6.1999999999999995e138Initial program 95.6%
sub-neg95.6%
distribute-frac-neg295.6%
+-commutative95.6%
associate-/l*93.8%
fma-define93.8%
distribute-frac-neg293.8%
distribute-neg-frac93.8%
sub-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
+-commutative93.8%
sub-neg93.8%
Simplified93.8%
Taylor expanded in z around 0 87.4%
+-commutative87.4%
*-commutative87.4%
Simplified87.4%
*-commutative87.4%
associate-/l*90.9%
*-commutative90.9%
Applied egg-rr90.9%
if 1.79999999999999982e-105 < z < 4.30000000000000023e-17 or 6.1999999999999995e138 < z Initial program 95.8%
sub-neg95.8%
distribute-frac-neg295.8%
+-commutative95.8%
associate-/l*91.7%
fma-define91.7%
distribute-frac-neg291.7%
distribute-neg-frac91.7%
sub-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
+-commutative91.7%
sub-neg91.7%
Simplified91.7%
Taylor expanded in y around -inf 87.1%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e+25) (not (<= z 1.15e+117))) (- x (* z (/ y a))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+25) || !(z <= 1.15e+117)) {
tmp = x - (z * (y / a));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.4d+25)) .or. (.not. (z <= 1.15d+117))) then
tmp = x - (z * (y / a))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+25) || !(z <= 1.15e+117)) {
tmp = x - (z * (y / a));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.4e+25) or not (z <= 1.15e+117): tmp = x - (z * (y / a)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e+25) || !(z <= 1.15e+117)) tmp = Float64(x - Float64(z * Float64(y / a))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.4e+25) || ~((z <= 1.15e+117))) tmp = x - (z * (y / a)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e+25], N[Not[LessEqual[z, 1.15e+117]], $MachinePrecision]], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+25} \lor \neg \left(z \leq 1.15 \cdot 10^{+117}\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -3.39999999999999984e25 or 1.14999999999999994e117 < z Initial program 90.0%
associate-/l*90.1%
Simplified90.1%
clear-num90.1%
un-div-inv90.3%
Applied egg-rr90.3%
Taylor expanded in z around inf 84.0%
associate-/r/89.7%
Applied egg-rr89.7%
if -3.39999999999999984e25 < z < 1.14999999999999994e117Initial program 95.2%
sub-neg95.2%
distribute-frac-neg295.2%
+-commutative95.2%
associate-/l*94.6%
fma-define94.6%
distribute-frac-neg294.6%
distribute-neg-frac94.6%
sub-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
+-commutative94.6%
sub-neg94.6%
Simplified94.6%
Taylor expanded in z around 0 83.8%
+-commutative83.8%
*-commutative83.8%
Simplified83.8%
*-commutative83.8%
associate-/l*87.7%
*-commutative87.7%
Applied egg-rr87.7%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -4e+134) (/ (- y) (/ a z)) (if (<= z 7.5e+223) (+ x (* t (/ y a))) (/ (* z (- y)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+134) {
tmp = -y / (a / z);
} else if (z <= 7.5e+223) {
tmp = x + (t * (y / a));
} else {
tmp = (z * -y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4d+134)) then
tmp = -y / (a / z)
else if (z <= 7.5d+223) then
tmp = x + (t * (y / a))
else
tmp = (z * -y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+134) {
tmp = -y / (a / z);
} else if (z <= 7.5e+223) {
tmp = x + (t * (y / a));
} else {
tmp = (z * -y) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+134: tmp = -y / (a / z) elif z <= 7.5e+223: tmp = x + (t * (y / a)) else: tmp = (z * -y) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+134) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (z <= 7.5e+223) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(Float64(z * Float64(-y)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+134) tmp = -y / (a / z); elseif (z <= 7.5e+223) tmp = x + (t * (y / a)); else tmp = (z * -y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+134], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+223], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * (-y)), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+134}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+223}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(-y\right)}{a}\\
\end{array}
\end{array}
if z < -3.99999999999999969e134Initial program 82.5%
sub-neg82.5%
distribute-frac-neg282.5%
+-commutative82.5%
associate-/l*88.5%
fma-define88.5%
distribute-frac-neg288.5%
distribute-neg-frac88.5%
sub-neg88.5%
distribute-neg-in88.5%
remove-double-neg88.5%
+-commutative88.5%
sub-neg88.5%
Simplified88.5%
Taylor expanded in z around inf 64.6%
mul-1-neg64.6%
associate-/l*70.6%
distribute-rgt-neg-in70.6%
distribute-neg-frac270.6%
Simplified70.6%
distribute-frac-neg270.6%
distribute-rgt-neg-in70.6%
clear-num70.6%
div-inv70.7%
distribute-neg-frac70.7%
Applied egg-rr70.7%
if -3.99999999999999969e134 < z < 7.5000000000000003e223Initial program 94.8%
sub-neg94.8%
distribute-frac-neg294.8%
+-commutative94.8%
associate-/l*93.5%
fma-define93.5%
distribute-frac-neg293.5%
distribute-neg-frac93.5%
sub-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
+-commutative93.5%
sub-neg93.5%
Simplified93.5%
Taylor expanded in z around 0 78.3%
+-commutative78.3%
*-commutative78.3%
Simplified78.3%
*-commutative78.3%
associate-/l*82.2%
*-commutative82.2%
Applied egg-rr82.2%
if 7.5000000000000003e223 < z Initial program 94.9%
sub-neg94.9%
distribute-frac-neg294.9%
+-commutative94.9%
associate-/l*94.7%
fma-define94.7%
distribute-frac-neg294.7%
distribute-neg-frac94.7%
sub-neg94.7%
distribute-neg-in94.7%
remove-double-neg94.7%
+-commutative94.7%
sub-neg94.7%
Simplified94.7%
Taylor expanded in z around inf 89.5%
mul-1-neg89.5%
associate-/l*89.2%
distribute-rgt-neg-in89.2%
distribute-neg-frac289.2%
Simplified89.2%
*-commutative89.2%
distribute-frac-neg289.2%
distribute-frac-neg89.2%
associate-*l/89.5%
Applied egg-rr89.5%
Final simplification81.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.4e+18) (- x (* z (/ y a))) (if (<= z 1.6e+133) (+ x (* t (/ y a))) (- x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e+18) {
tmp = x - (z * (y / a));
} else if (z <= 1.6e+133) {
tmp = x + (t * (y / a));
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.4d+18)) then
tmp = x - (z * (y / a))
else if (z <= 1.6d+133) then
tmp = x + (t * (y / a))
else
tmp = x - (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e+18) {
tmp = x - (z * (y / a));
} else if (z <= 1.6e+133) {
tmp = x + (t * (y / a));
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.4e+18: tmp = x - (z * (y / a)) elif z <= 1.6e+133: tmp = x + (t * (y / a)) else: tmp = x - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.4e+18) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= 1.6e+133) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.4e+18) tmp = x - (z * (y / a)); elseif (z <= 1.6e+133) tmp = x + (t * (y / a)); else tmp = x - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.4e+18], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+133], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+18}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+133}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if z < -4.4e18Initial program 84.7%
associate-/l*91.5%
Simplified91.5%
clear-num91.5%
un-div-inv91.5%
Applied egg-rr91.5%
Taylor expanded in z around inf 84.6%
associate-/r/92.8%
Applied egg-rr92.8%
if -4.4e18 < z < 1.59999999999999999e133Initial program 95.4%
sub-neg95.4%
distribute-frac-neg295.4%
+-commutative95.4%
associate-/l*93.7%
fma-define93.7%
distribute-frac-neg293.7%
distribute-neg-frac93.7%
sub-neg93.7%
distribute-neg-in93.7%
remove-double-neg93.7%
+-commutative93.7%
sub-neg93.7%
Simplified93.7%
Taylor expanded in z around 0 83.9%
+-commutative83.9%
*-commutative83.9%
Simplified83.9%
*-commutative83.9%
associate-/l*87.6%
*-commutative87.6%
Applied egg-rr87.6%
if 1.59999999999999999e133 < z Initial program 97.0%
associate-/l*91.4%
Simplified91.4%
clear-num91.3%
un-div-inv91.3%
Applied egg-rr91.3%
Taylor expanded in z around inf 85.3%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -5500000.0) x (if (<= a 2.2e-42) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5500000.0) {
tmp = x;
} else if (a <= 2.2e-42) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5500000.0d0)) then
tmp = x
else if (a <= 2.2d-42) then
tmp = t * (y / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5500000.0) {
tmp = x;
} else if (a <= 2.2e-42) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5500000.0: tmp = x elif a <= 2.2e-42: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5500000.0) tmp = x; elseif (a <= 2.2e-42) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5500000.0) tmp = x; elseif (a <= 2.2e-42) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5500000.0], x, If[LessEqual[a, 2.2e-42], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5500000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-42}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.5e6 or 2.20000000000000005e-42 < a Initial program 88.0%
sub-neg88.0%
distribute-frac-neg288.0%
+-commutative88.0%
associate-/l*99.1%
fma-define99.1%
distribute-frac-neg299.1%
distribute-neg-frac99.1%
sub-neg99.1%
distribute-neg-in99.1%
remove-double-neg99.1%
+-commutative99.1%
sub-neg99.1%
Simplified99.1%
Taylor expanded in y around 0 61.1%
if -5.5e6 < a < 2.20000000000000005e-42Initial program 99.1%
sub-neg99.1%
distribute-frac-neg299.1%
+-commutative99.1%
associate-/l*86.1%
fma-define86.1%
distribute-frac-neg286.1%
distribute-neg-frac86.1%
sub-neg86.1%
distribute-neg-in86.1%
remove-double-neg86.1%
+-commutative86.1%
sub-neg86.1%
Simplified86.1%
Taylor expanded in t around inf 52.3%
*-commutative52.3%
associate-/l*45.2%
Simplified45.2%
Taylor expanded in y around 0 52.3%
associate-/l*53.8%
Simplified53.8%
Final simplification57.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -35000000.0) x (if (<= a 7e-42) (/ t (/ a y)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -35000000.0) {
tmp = x;
} else if (a <= 7e-42) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-35000000.0d0)) then
tmp = x
else if (a <= 7d-42) then
tmp = t / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -35000000.0) {
tmp = x;
} else if (a <= 7e-42) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -35000000.0: tmp = x elif a <= 7e-42: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -35000000.0) tmp = x; elseif (a <= 7e-42) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -35000000.0) tmp = x; elseif (a <= 7e-42) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -35000000.0], x, If[LessEqual[a, 7e-42], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -35000000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-42}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.5e7 or 7.0000000000000004e-42 < a Initial program 88.0%
sub-neg88.0%
distribute-frac-neg288.0%
+-commutative88.0%
associate-/l*99.1%
fma-define99.1%
distribute-frac-neg299.1%
distribute-neg-frac99.1%
sub-neg99.1%
distribute-neg-in99.1%
remove-double-neg99.1%
+-commutative99.1%
sub-neg99.1%
Simplified99.1%
Taylor expanded in y around 0 61.1%
if -3.5e7 < a < 7.0000000000000004e-42Initial program 99.1%
sub-neg99.1%
distribute-frac-neg299.1%
+-commutative99.1%
associate-/l*86.1%
fma-define86.1%
distribute-frac-neg286.1%
distribute-neg-frac86.1%
sub-neg86.1%
distribute-neg-in86.1%
remove-double-neg86.1%
+-commutative86.1%
sub-neg86.1%
Simplified86.1%
Taylor expanded in t around inf 52.3%
*-commutative52.3%
associate-/l*45.2%
Simplified45.2%
Taylor expanded in y around 0 52.3%
associate-/l*53.8%
Simplified53.8%
clear-num53.8%
div-inv53.8%
Applied egg-rr53.8%
Final simplification57.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.9e+167) (+ x (* t (/ y a))) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e+167) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.9d+167)) then
tmp = x + (t * (y / a))
else
tmp = x + (y * ((t - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e+167) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.9e+167: tmp = x + (t * (y / a)) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.9e+167) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.9e+167) tmp = x + (t * (y / a)); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.9e+167], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+167}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if t < -1.89999999999999997e167Initial program 82.8%
sub-neg82.8%
distribute-frac-neg282.8%
+-commutative82.8%
associate-/l*70.6%
fma-define70.6%
distribute-frac-neg270.6%
distribute-neg-frac70.6%
sub-neg70.6%
distribute-neg-in70.6%
remove-double-neg70.6%
+-commutative70.6%
sub-neg70.6%
Simplified70.6%
Taylor expanded in z around 0 78.3%
+-commutative78.3%
*-commutative78.3%
Simplified78.3%
*-commutative78.3%
associate-/l*90.3%
*-commutative90.3%
Applied egg-rr90.3%
if -1.89999999999999997e167 < t Initial program 94.3%
associate-/l*95.0%
Simplified95.0%
Final simplification94.6%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 93.3%
sub-neg93.3%
distribute-frac-neg293.3%
+-commutative93.3%
associate-/l*92.9%
fma-define92.9%
distribute-frac-neg292.9%
distribute-neg-frac92.9%
sub-neg92.9%
distribute-neg-in92.9%
remove-double-neg92.9%
+-commutative92.9%
sub-neg92.9%
Simplified92.9%
Taylor expanded in y around 0 39.5%
Final simplification39.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(- x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(- x (/ (* y (- z t)) a))
(- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x - (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x - ((y * (z - t)) / a)
else
tmp = x - (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x - (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x - ((y * (z - t)) / a) else: tmp = x - (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x - Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x - Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x - (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x - ((y * (z - t)) / a); else tmp = x - (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024059
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))