
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.5e+109) (not (<= t 7.5e+95))) (- (+ x (* y (/ z t))) (* a (/ y t))) (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.5e+109) || !(t <= 7.5e+95)) {
tmp = (x + (y * (z / t))) - (a * (y / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - 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 <= (-4.5d+109)) .or. (.not. (t <= 7.5d+95))) then
tmp = (x + (y * (z / t))) - (a * (y / t))
else
tmp = (x + y) + ((z - t) * (y / (t - 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 <= -4.5e+109) || !(t <= 7.5e+95)) {
tmp = (x + (y * (z / t))) - (a * (y / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.5e+109) or not (t <= 7.5e+95): tmp = (x + (y * (z / t))) - (a * (y / t)) else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.5e+109) || !(t <= 7.5e+95)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) - Float64(a * Float64(y / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.5e+109) || ~((t <= 7.5e+95))) tmp = (x + (y * (z / t))) - (a * (y / t)); else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.5e+109], N[Not[LessEqual[t, 7.5e+95]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+109} \lor \neg \left(t \leq 7.5 \cdot 10^{+95}\right):\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -4.4999999999999996e109 or 7.5000000000000001e95 < t Initial program 42.0%
sub-neg42.0%
+-commutative42.0%
distribute-frac-neg42.0%
distribute-rgt-neg-out42.0%
associate-/l*57.8%
fma-define58.1%
distribute-frac-neg58.1%
distribute-neg-frac258.1%
sub-neg58.1%
distribute-neg-in58.1%
remove-double-neg58.1%
+-commutative58.1%
sub-neg58.1%
Simplified58.1%
Taylor expanded in t around inf 70.1%
associate-+r+77.0%
distribute-rgt1-in77.0%
metadata-eval77.0%
mul0-lft77.0%
associate-+r+77.0%
associate-/l*82.7%
associate-/l*89.5%
Simplified89.5%
if -4.4999999999999996e109 < t < 7.5000000000000001e95Initial program 90.5%
Taylor expanded in y around 0 90.5%
associate-*l/94.1%
Simplified94.1%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -8.5e+140)
(not
(or (<= z -1.6e-51) (and (not (<= z -3.15e-55)) (<= z 9.6e+96)))))
(* y (/ z (- t a)))
(+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+140) || !((z <= -1.6e-51) || (!(z <= -3.15e-55) && (z <= 9.6e+96)))) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
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 <= (-8.5d+140)) .or. (.not. (z <= (-1.6d-51)) .or. (.not. (z <= (-3.15d-55))) .and. (z <= 9.6d+96))) then
tmp = y * (z / (t - a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+140) || !((z <= -1.6e-51) || (!(z <= -3.15e-55) && (z <= 9.6e+96)))) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.5e+140) or not ((z <= -1.6e-51) or (not (z <= -3.15e-55) and (z <= 9.6e+96))): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.5e+140) || !((z <= -1.6e-51) || (!(z <= -3.15e-55) && (z <= 9.6e+96)))) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.5e+140) || ~(((z <= -1.6e-51) || (~((z <= -3.15e-55)) && (z <= 9.6e+96))))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e+140], N[Not[Or[LessEqual[z, -1.6e-51], And[N[Not[LessEqual[z, -3.15e-55]], $MachinePrecision], LessEqual[z, 9.6e+96]]]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+140} \lor \neg \left(z \leq -1.6 \cdot 10^{-51} \lor \neg \left(z \leq -3.15 \cdot 10^{-55}\right) \land z \leq 9.6 \cdot 10^{+96}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.4999999999999996e140 or -1.6e-51 < z < -3.1499999999999999e-55 or 9.59999999999999972e96 < z Initial program 76.4%
sub-neg76.4%
+-commutative76.4%
distribute-frac-neg76.4%
distribute-rgt-neg-out76.4%
associate-/l*90.7%
fma-define90.8%
distribute-frac-neg90.8%
distribute-neg-frac290.8%
sub-neg90.8%
distribute-neg-in90.8%
remove-double-neg90.8%
+-commutative90.8%
sub-neg90.8%
Simplified90.8%
Taylor expanded in z around inf 54.8%
associate-/l*66.3%
Simplified66.3%
if -8.4999999999999996e140 < z < -1.6e-51 or -3.1499999999999999e-55 < z < 9.59999999999999972e96Initial program 73.9%
Taylor expanded in a around inf 70.0%
+-commutative70.0%
Simplified70.0%
Final simplification68.9%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.25e+198)
(+ x y)
(if (<= y -4.7e+116)
(* a (/ y (- t)))
(if (<= y -1.04e-103)
(+ x y)
(if (<= y 1.75e+18) x (* y (- 1.0 (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.25e+198) {
tmp = x + y;
} else if (y <= -4.7e+116) {
tmp = a * (y / -t);
} else if (y <= -1.04e-103) {
tmp = x + y;
} else if (y <= 1.75e+18) {
tmp = x;
} else {
tmp = y * (1.0 - (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 (y <= (-1.25d+198)) then
tmp = x + y
else if (y <= (-4.7d+116)) then
tmp = a * (y / -t)
else if (y <= (-1.04d-103)) then
tmp = x + y
else if (y <= 1.75d+18) then
tmp = x
else
tmp = y * (1.0d0 - (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 (y <= -1.25e+198) {
tmp = x + y;
} else if (y <= -4.7e+116) {
tmp = a * (y / -t);
} else if (y <= -1.04e-103) {
tmp = x + y;
} else if (y <= 1.75e+18) {
tmp = x;
} else {
tmp = y * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.25e+198: tmp = x + y elif y <= -4.7e+116: tmp = a * (y / -t) elif y <= -1.04e-103: tmp = x + y elif y <= 1.75e+18: tmp = x else: tmp = y * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.25e+198) tmp = Float64(x + y); elseif (y <= -4.7e+116) tmp = Float64(a * Float64(y / Float64(-t))); elseif (y <= -1.04e-103) tmp = Float64(x + y); elseif (y <= 1.75e+18) tmp = x; else tmp = Float64(y * Float64(1.0 - Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.25e+198) tmp = x + y; elseif (y <= -4.7e+116) tmp = a * (y / -t); elseif (y <= -1.04e-103) tmp = x + y; elseif (y <= 1.75e+18) tmp = x; else tmp = y * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.25e+198], N[(x + y), $MachinePrecision], If[LessEqual[y, -4.7e+116], N[(a * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.04e-103], N[(x + y), $MachinePrecision], If[LessEqual[y, 1.75e+18], x, N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+198}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{+116}:\\
\;\;\;\;a \cdot \frac{y}{-t}\\
\mathbf{elif}\;y \leq -1.04 \cdot 10^{-103}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if y < -1.25000000000000012e198 or -4.7000000000000003e116 < y < -1.04000000000000001e-103Initial program 77.6%
Taylor expanded in a around inf 66.1%
+-commutative66.1%
Simplified66.1%
if -1.25000000000000012e198 < y < -4.7000000000000003e116Initial program 45.8%
sub-neg45.8%
+-commutative45.8%
distribute-frac-neg45.8%
distribute-rgt-neg-out45.8%
associate-/l*60.0%
fma-define60.2%
distribute-frac-neg60.2%
distribute-neg-frac260.2%
sub-neg60.2%
distribute-neg-in60.2%
remove-double-neg60.2%
+-commutative60.2%
sub-neg60.2%
Simplified60.2%
Taylor expanded in t around inf 72.4%
associate-+r+72.4%
distribute-rgt1-in72.4%
metadata-eval72.4%
mul0-lft72.4%
associate-+r+72.4%
associate-/l*81.5%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in a around inf 44.4%
mul-1-neg44.4%
associate-*r/49.0%
distribute-rgt-neg-in49.0%
distribute-neg-frac249.0%
Simplified49.0%
if -1.04000000000000001e-103 < y < 1.75e18Initial program 87.6%
Taylor expanded in x around inf 78.2%
if 1.75e18 < y Initial program 59.7%
Taylor expanded in t around 0 62.1%
+-commutative62.1%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in y around inf 58.6%
Final simplification67.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.9e-14)
(+ x y)
(if (<= a -2.55e-278)
x
(if (<= a 2.35e-278) (/ (* y z) t) (if (<= a 5.5e-26) x (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e-14) {
tmp = x + y;
} else if (a <= -2.55e-278) {
tmp = x;
} else if (a <= 2.35e-278) {
tmp = (y * z) / t;
} else if (a <= 5.5e-26) {
tmp = x;
} else {
tmp = x + y;
}
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 <= (-2.9d-14)) then
tmp = x + y
else if (a <= (-2.55d-278)) then
tmp = x
else if (a <= 2.35d-278) then
tmp = (y * z) / t
else if (a <= 5.5d-26) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e-14) {
tmp = x + y;
} else if (a <= -2.55e-278) {
tmp = x;
} else if (a <= 2.35e-278) {
tmp = (y * z) / t;
} else if (a <= 5.5e-26) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e-14: tmp = x + y elif a <= -2.55e-278: tmp = x elif a <= 2.35e-278: tmp = (y * z) / t elif a <= 5.5e-26: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e-14) tmp = Float64(x + y); elseif (a <= -2.55e-278) tmp = x; elseif (a <= 2.35e-278) tmp = Float64(Float64(y * z) / t); elseif (a <= 5.5e-26) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.9e-14) tmp = x + y; elseif (a <= -2.55e-278) tmp = x; elseif (a <= 2.35e-278) tmp = (y * z) / t; elseif (a <= 5.5e-26) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e-14], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.55e-278], x, If[LessEqual[a, 2.35e-278], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 5.5e-26], x, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-14}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.55 \cdot 10^{-278}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-278}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-26}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.9000000000000003e-14 or 5.5000000000000005e-26 < a Initial program 77.2%
Taylor expanded in a around inf 74.7%
+-commutative74.7%
Simplified74.7%
if -2.9000000000000003e-14 < a < -2.55000000000000005e-278 or 2.3499999999999998e-278 < a < 5.5000000000000005e-26Initial program 71.9%
Taylor expanded in x around inf 56.6%
if -2.55000000000000005e-278 < a < 2.3499999999999998e-278Initial program 67.8%
sub-neg67.8%
+-commutative67.8%
distribute-frac-neg67.8%
distribute-rgt-neg-out67.8%
associate-/l*68.2%
fma-define68.1%
distribute-frac-neg68.1%
distribute-neg-frac268.1%
sub-neg68.1%
distribute-neg-in68.1%
remove-double-neg68.1%
+-commutative68.1%
sub-neg68.1%
Simplified68.1%
Taylor expanded in z around inf 77.3%
associate-/l*69.7%
Simplified69.7%
Taylor expanded in t around inf 77.3%
Final simplification67.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.1e-13)
(+ x y)
(if (<= a -2.25e-278)
x
(if (<= a 1e-276) (* y (/ z t)) (if (<= a 5.8e-35) x (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-13) {
tmp = x + y;
} else if (a <= -2.25e-278) {
tmp = x;
} else if (a <= 1e-276) {
tmp = y * (z / t);
} else if (a <= 5.8e-35) {
tmp = x;
} else {
tmp = x + y;
}
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 <= (-1.1d-13)) then
tmp = x + y
else if (a <= (-2.25d-278)) then
tmp = x
else if (a <= 1d-276) then
tmp = y * (z / t)
else if (a <= 5.8d-35) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-13) {
tmp = x + y;
} else if (a <= -2.25e-278) {
tmp = x;
} else if (a <= 1e-276) {
tmp = y * (z / t);
} else if (a <= 5.8e-35) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.1e-13: tmp = x + y elif a <= -2.25e-278: tmp = x elif a <= 1e-276: tmp = y * (z / t) elif a <= 5.8e-35: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e-13) tmp = Float64(x + y); elseif (a <= -2.25e-278) tmp = x; elseif (a <= 1e-276) tmp = Float64(y * Float64(z / t)); elseif (a <= 5.8e-35) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.1e-13) tmp = x + y; elseif (a <= -2.25e-278) tmp = x; elseif (a <= 1e-276) tmp = y * (z / t); elseif (a <= 5.8e-35) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-13], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.25e-278], x, If[LessEqual[a, 1e-276], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e-35], x, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-13}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.25 \cdot 10^{-278}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 10^{-276}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-35}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.09999999999999998e-13 or 5.8000000000000004e-35 < a Initial program 77.2%
Taylor expanded in a around inf 74.7%
+-commutative74.7%
Simplified74.7%
if -1.09999999999999998e-13 < a < -2.2499999999999999e-278 or 1e-276 < a < 5.8000000000000004e-35Initial program 71.9%
Taylor expanded in x around inf 56.6%
if -2.2499999999999999e-278 < a < 1e-276Initial program 67.8%
sub-neg67.8%
+-commutative67.8%
distribute-frac-neg67.8%
distribute-rgt-neg-out67.8%
associate-/l*68.2%
fma-define68.1%
distribute-frac-neg68.1%
distribute-neg-frac268.1%
sub-neg68.1%
distribute-neg-in68.1%
remove-double-neg68.1%
+-commutative68.1%
sub-neg68.1%
Simplified68.1%
Taylor expanded in z around inf 77.3%
associate-/l*69.7%
Simplified69.7%
Taylor expanded in t around inf 77.3%
associate-/l*69.7%
Simplified69.7%
Final simplification67.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.8e+201) (not (<= t 1.55e+98))) (- x (/ (* y (- a z)) t)) (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.8e+201) || !(t <= 1.55e+98)) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) + ((z - t) * (y / (t - 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 <= (-2.8d+201)) .or. (.not. (t <= 1.55d+98))) then
tmp = x - ((y * (a - z)) / t)
else
tmp = (x + y) + ((z - t) * (y / (t - 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 <= -2.8e+201) || !(t <= 1.55e+98)) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.8e+201) or not (t <= 1.55e+98): tmp = x - ((y * (a - z)) / t) else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.8e+201) || !(t <= 1.55e+98)) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.8e+201) || ~((t <= 1.55e+98))) tmp = x - ((y * (a - z)) / t); else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.8e+201], N[Not[LessEqual[t, 1.55e+98]], $MachinePrecision]], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+201} \lor \neg \left(t \leq 1.55 \cdot 10^{+98}\right):\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -2.80000000000000005e201 or 1.5500000000000001e98 < t Initial program 38.6%
Taylor expanded in t around inf 79.3%
associate--l+79.3%
distribute-lft-out--79.3%
div-sub79.3%
mul-1-neg79.3%
unsub-neg79.3%
*-commutative79.3%
distribute-lft-out--79.4%
Simplified79.4%
if -2.80000000000000005e201 < t < 1.5500000000000001e98Initial program 88.2%
Taylor expanded in y around 0 88.2%
associate-*l/93.0%
Simplified93.0%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.7e+116) (* y (/ (- z a) t)) (if (<= y -1.06e-101) (+ x y) (if (<= y 2.9e+19) x (* y (- 1.0 (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.7e+116) {
tmp = y * ((z - a) / t);
} else if (y <= -1.06e-101) {
tmp = x + y;
} else if (y <= 2.9e+19) {
tmp = x;
} else {
tmp = y * (1.0 - (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 (y <= (-2.7d+116)) then
tmp = y * ((z - a) / t)
else if (y <= (-1.06d-101)) then
tmp = x + y
else if (y <= 2.9d+19) then
tmp = x
else
tmp = y * (1.0d0 - (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 (y <= -2.7e+116) {
tmp = y * ((z - a) / t);
} else if (y <= -1.06e-101) {
tmp = x + y;
} else if (y <= 2.9e+19) {
tmp = x;
} else {
tmp = y * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.7e+116: tmp = y * ((z - a) / t) elif y <= -1.06e-101: tmp = x + y elif y <= 2.9e+19: tmp = x else: tmp = y * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.7e+116) tmp = Float64(y * Float64(Float64(z - a) / t)); elseif (y <= -1.06e-101) tmp = Float64(x + y); elseif (y <= 2.9e+19) tmp = x; else tmp = Float64(y * Float64(1.0 - Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.7e+116) tmp = y * ((z - a) / t); elseif (y <= -1.06e-101) tmp = x + y; elseif (y <= 2.9e+19) tmp = x; else tmp = y * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.7e+116], N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.06e-101], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.9e+19], x, N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \frac{z - a}{t}\\
\mathbf{elif}\;y \leq -1.06 \cdot 10^{-101}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if y < -2.7e116Initial program 55.5%
sub-neg55.5%
+-commutative55.5%
distribute-frac-neg55.5%
distribute-rgt-neg-out55.5%
associate-/l*70.5%
fma-define70.5%
distribute-frac-neg70.5%
distribute-neg-frac270.5%
sub-neg70.5%
distribute-neg-in70.5%
remove-double-neg70.5%
+-commutative70.5%
sub-neg70.5%
Simplified70.5%
Taylor expanded in t around inf 60.5%
associate-+r+63.3%
distribute-rgt1-in63.3%
metadata-eval63.3%
mul0-lft63.3%
associate-+r+63.3%
associate-/l*67.5%
associate-/l*67.5%
Simplified67.5%
Taylor expanded in y around inf 56.7%
div-sub56.7%
Simplified56.7%
if -2.7e116 < y < -1.0600000000000001e-101Initial program 84.8%
Taylor expanded in a around inf 76.6%
+-commutative76.6%
Simplified76.6%
if -1.0600000000000001e-101 < y < 2.9e19Initial program 87.6%
Taylor expanded in x around inf 78.2%
if 2.9e19 < y Initial program 59.7%
Taylor expanded in t around 0 62.1%
+-commutative62.1%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in y around inf 58.6%
Final simplification69.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.3e+14) (not (<= a 4.5e-25))) (- (+ x y) (* y (/ z a))) (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.3e+14) || !(a <= 4.5e-25)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - ((y * (a - z)) / t);
}
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 <= (-1.3d+14)) .or. (.not. (a <= 4.5d-25))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x - ((y * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.3e+14) || !(a <= 4.5e-25)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.3e+14) or not (a <= 4.5e-25): tmp = (x + y) - (y * (z / a)) else: tmp = x - ((y * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.3e+14) || !(a <= 4.5e-25)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.3e+14) || ~((a <= 4.5e-25))) tmp = (x + y) - (y * (z / a)); else tmp = x - ((y * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.3e+14], N[Not[LessEqual[a, 4.5e-25]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+14} \lor \neg \left(a \leq 4.5 \cdot 10^{-25}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -1.3e14 or 4.5000000000000001e-25 < a Initial program 77.2%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
associate-/l*84.3%
Simplified84.3%
if -1.3e14 < a < 4.5000000000000001e-25Initial program 71.6%
Taylor expanded in t around inf 82.8%
associate--l+82.8%
distribute-lft-out--82.8%
div-sub82.8%
mul-1-neg82.8%
unsub-neg82.8%
*-commutative82.8%
distribute-lft-out--82.8%
Simplified82.8%
Final simplification83.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.1e+14) (not (<= a 1.48e+57))) (+ x y) (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.1e+14) || !(a <= 1.48e+57)) {
tmp = x + y;
} else {
tmp = x - ((y * (a - z)) / t);
}
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 <= (-4.1d+14)) .or. (.not. (a <= 1.48d+57))) then
tmp = x + y
else
tmp = x - ((y * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.1e+14) || !(a <= 1.48e+57)) {
tmp = x + y;
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.1e+14) or not (a <= 1.48e+57): tmp = x + y else: tmp = x - ((y * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.1e+14) || !(a <= 1.48e+57)) tmp = Float64(x + y); else tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.1e+14) || ~((a <= 1.48e+57))) tmp = x + y; else tmp = x - ((y * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.1e+14], N[Not[LessEqual[a, 1.48e+57]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+14} \lor \neg \left(a \leq 1.48 \cdot 10^{+57}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -4.1e14 or 1.47999999999999999e57 < a Initial program 78.4%
Taylor expanded in a around inf 77.8%
+-commutative77.8%
Simplified77.8%
if -4.1e14 < a < 1.47999999999999999e57Initial program 71.2%
Taylor expanded in t around inf 81.8%
associate--l+81.8%
distribute-lft-out--81.8%
div-sub81.8%
mul-1-neg81.8%
unsub-neg81.8%
*-commutative81.8%
distribute-lft-out--81.8%
Simplified81.8%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.3e+19) (not (<= a 1.95e+26))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.3e+19) || !(a <= 1.95e+26)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
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 <= (-3.3d+19)) .or. (.not. (a <= 1.95d+26))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.3e+19) || !(a <= 1.95e+26)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.3e+19) or not (a <= 1.95e+26): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.3e+19) || !(a <= 1.95e+26)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.3e+19) || ~((a <= 1.95e+26))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.3e+19], N[Not[LessEqual[a, 1.95e+26]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+19} \lor \neg \left(a \leq 1.95 \cdot 10^{+26}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -3.3e19 or 1.95e26 < a Initial program 76.6%
Taylor expanded in a around inf 76.0%
+-commutative76.0%
Simplified76.0%
if -3.3e19 < a < 1.95e26Initial program 72.6%
sub-neg72.6%
+-commutative72.6%
distribute-frac-neg72.6%
distribute-rgt-neg-out72.6%
associate-/l*77.6%
fma-define77.6%
distribute-frac-neg77.6%
distribute-neg-frac277.6%
sub-neg77.6%
distribute-neg-in77.6%
remove-double-neg77.6%
+-commutative77.6%
sub-neg77.6%
Simplified77.6%
Taylor expanded in t around inf 75.2%
associate-+r+81.5%
distribute-rgt1-in81.5%
metadata-eval81.5%
mul0-lft81.5%
associate-+r+81.5%
associate-/l*80.1%
associate-/l*75.3%
Simplified75.3%
Taylor expanded in a around 0 80.4%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-13) (not (<= a 1.75e-28))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-13) || !(a <= 1.75e-28)) {
tmp = x + 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 <= (-5.5d-13)) .or. (.not. (a <= 1.75d-28))) then
tmp = x + 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 <= -5.5e-13) || !(a <= 1.75e-28)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-13) or not (a <= 1.75e-28): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e-13) || !(a <= 1.75e-28)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e-13) || ~((a <= 1.75e-28))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-13], N[Not[LessEqual[a, 1.75e-28]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-13} \lor \neg \left(a \leq 1.75 \cdot 10^{-28}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.49999999999999979e-13 or 1.75e-28 < a Initial program 77.2%
Taylor expanded in a around inf 74.7%
+-commutative74.7%
Simplified74.7%
if -5.49999999999999979e-13 < a < 1.75e-28Initial program 71.4%
Taylor expanded in x around inf 52.6%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.45e+100) x y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.45e+100) {
tmp = x;
} else {
tmp = y;
}
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 (y <= 1.45d+100) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.45e+100) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.45e+100: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.45e+100) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.45e+100) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.45e+100], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{+100}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.45e100Initial program 77.6%
Taylor expanded in x around inf 57.4%
if 1.45e100 < y Initial program 58.5%
Taylor expanded in x around 0 56.0%
sub-neg56.0%
*-rgt-identity56.0%
associate-*r/74.8%
distribute-rgt-neg-in74.8%
mul-1-neg74.8%
distribute-lft-in74.8%
mul-1-neg74.8%
unsub-neg74.8%
Simplified74.8%
Taylor expanded in a around inf 30.1%
Final simplification53.1%
(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 74.6%
Taylor expanded in x around inf 51.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} 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) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
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 + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024100
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))