
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- x y) -5e+111) (not (<= (- x y) 2e+90))) (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+111) || !((x - y) <= 2e+90)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
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 (((x - y) <= (-5d+111)) .or. (.not. ((x - y) <= 2d+90))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+111) || !((x - y) <= 2e+90)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x - y) <= -5e+111) or not ((x - y) <= 2e+90): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x - y) <= -5e+111) || !(Float64(x - y) <= 2e+90)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x - y) <= -5e+111) || ~(((x - y) <= 2e+90))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x - y), $MachinePrecision], -5e+111], N[Not[LessEqual[N[(x - y), $MachinePrecision], 2e+90]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+111} \lor \neg \left(x - y \leq 2 \cdot 10^{+90}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 x y) < -4.9999999999999997e111 or 1.99999999999999993e90 < (-.f64 x y) Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.7%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 72.3%
if -4.9999999999999997e111 < (-.f64 x y) < 1.99999999999999993e90Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.1%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -5e+111) (* 60.0 (/ (- x y) (- z t))) (if (<= (- x y) 2e+90) (* a 120.0) (/ 60.0 (/ (- z t) (- x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -5e+111) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((x - y) <= 2e+90) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / (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 ((x - y) <= (-5d+111)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((x - y) <= 2d+90) then
tmp = a * 120.0d0
else
tmp = 60.0d0 / ((z - t) / (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 ((x - y) <= -5e+111) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((x - y) <= 2e+90) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -5e+111: tmp = 60.0 * ((x - y) / (z - t)) elif (x - y) <= 2e+90: tmp = a * 120.0 else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -5e+111) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(x - y) <= 2e+90) tmp = Float64(a * 120.0); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x - y) <= -5e+111) tmp = 60.0 * ((x - y) / (z - t)); elseif ((x - y) <= 2e+90) tmp = a * 120.0; else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -5e+111], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e+90], N[(a * 120.0), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+111}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+90}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (-.f64 x y) < -4.9999999999999997e111Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.7%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 71.7%
if -4.9999999999999997e111 < (-.f64 x y) < 1.99999999999999993e90Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.1%
if 1.99999999999999993e90 < (-.f64 x y) Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.7%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 72.8%
clear-num72.6%
un-div-inv72.9%
Applied egg-rr72.9%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.2e+91) (not (<= x 3.5e-60))) (+ (* a 120.0) (* 60.0 (/ x (- z t)))) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.2e+91) || !(x <= 3.5e-60)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (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 ((x <= (-3.2d+91)) .or. (.not. (x <= 3.5d-60))) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (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 ((x <= -3.2e+91) || !(x <= 3.5e-60)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.2e+91) or not (x <= 3.5e-60): tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.2e+91) || !(x <= 3.5e-60)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.2e+91) || ~((x <= 3.5e-60))) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.2e+91], N[Not[LessEqual[x, 3.5e-60]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+91} \lor \neg \left(x \leq 3.5 \cdot 10^{-60}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -3.19999999999999989e91 or 3.49999999999999976e-60 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 89.3%
if -3.19999999999999989e91 < x < 3.49999999999999976e-60Initial program 99.9%
Taylor expanded in x around 0 97.0%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.4e+91) (not (<= x 7.3e-60))) (+ (* a 120.0) (* 60.0 (/ x (- z t)))) (+ (* a 120.0) (/ 60.0 (/ (- t z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.4e+91) || !(x <= 7.3e-60)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / ((t - z) / 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 ((x <= (-5.4d+91)) .or. (.not. (x <= 7.3d-60))) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.4e+91) || !(x <= 7.3e-60)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.4e+91) or not (x <= 7.3e-60): tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (a * 120.0) + (60.0 / ((t - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.4e+91) || !(x <= 7.3e-60)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5.4e+91) || ~((x <= 7.3e-60))) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (a * 120.0) + (60.0 / ((t - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.4e+91], N[Not[LessEqual[x, 7.3e-60]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+91} \lor \neg \left(x \leq 7.3 \cdot 10^{-60}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\end{array}
\end{array}
if x < -5.4e91 or 7.2999999999999997e-60 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 89.3%
if -5.4e91 < x < 7.2999999999999997e-60Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 97.0%
+-commutative97.0%
fma-define97.0%
associate-*r/97.0%
remove-double-neg97.0%
neg-mul-197.0%
times-frac97.0%
metadata-eval97.0%
neg-sub097.0%
sub-neg97.0%
+-commutative97.0%
associate--r+97.0%
neg-sub097.0%
remove-double-neg97.0%
Simplified97.0%
fma-undefine97.0%
*-commutative97.0%
+-commutative97.0%
clear-num96.9%
un-div-inv97.0%
Applied egg-rr97.0%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.2e-68) (not (<= t 62000.0))) (+ (* a 120.0) (* 60.0 (/ (- y x) t))) (+ (* a 120.0) (* 60.0 (/ (- x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.2e-68) || !(t <= 62000.0)) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / 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 ((t <= (-3.2d-68)) .or. (.not. (t <= 62000.0d0))) then
tmp = (a * 120.0d0) + (60.0d0 * ((y - x) / t))
else
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.2e-68) || !(t <= 62000.0)) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.2e-68) or not (t <= 62000.0): tmp = (a * 120.0) + (60.0 * ((y - x) / t)) else: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.2e-68) || !(t <= 62000.0)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(y - x) / t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.2e-68) || ~((t <= 62000.0))) tmp = (a * 120.0) + (60.0 * ((y - x) / t)); else tmp = (a * 120.0) + (60.0 * ((x - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.2e-68], N[Not[LessEqual[t, 62000.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-68} \lor \neg \left(t \leq 62000\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if t < -3.1999999999999999e-68 or 62000 < t Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 87.9%
associate-*r/87.9%
neg-mul-187.9%
neg-sub087.9%
sub-neg87.9%
+-commutative87.9%
associate--r+87.9%
neg-sub087.9%
remove-double-neg87.9%
Simplified87.9%
if -3.1999999999999999e-68 < t < 62000Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 87.0%
Final simplification87.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -4.3e+92)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= y 3.15e+243)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.3e+92) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (y <= 3.15e+243) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (y * -60.0) / (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 (y <= (-4.3d+92)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (y <= 3.15d+243) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (y * (-60.0d0)) / (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 (y <= -4.3e+92) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (y <= 3.15e+243) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.3e+92: tmp = 60.0 / ((z - t) / (x - y)) elif y <= 3.15e+243: tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (y * -60.0) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.3e+92) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (y <= 3.15e+243) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(y * -60.0) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.3e+92) tmp = 60.0 / ((z - t) / (x - y)); elseif (y <= 3.15e+243) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (y * -60.0) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.3e+92], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.15e+243], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+92}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{+243}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -4.2999999999999998e92Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.7%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 69.7%
clear-num69.6%
un-div-inv69.8%
Applied egg-rr69.8%
if -4.2999999999999998e92 < y < 3.14999999999999989e243Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.7%
if 3.14999999999999989e243 < y Initial program 99.8%
associate-/l*99.3%
Simplified99.3%
+-commutative99.3%
fma-define99.4%
associate-*r/99.9%
*-commutative99.9%
associate-/l*99.8%
Applied egg-rr99.8%
clear-num99.4%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 85.3%
associate-*r/85.8%
*-commutative85.8%
Simplified85.8%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.08e+141) (not (<= x 4.05e+158))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.08e+141) || !(x <= 4.05e+158)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
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 ((x <= (-1.08d+141)) .or. (.not. (x <= 4.05d+158))) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.08e+141) || !(x <= 4.05e+158)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.08e+141) or not (x <= 4.05e+158): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.08e+141) || !(x <= 4.05e+158)) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.08e+141) || ~((x <= 4.05e+158))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.08e+141], N[Not[LessEqual[x, 4.05e+158]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.08 \cdot 10^{+141} \lor \neg \left(x \leq 4.05 \cdot 10^{+158}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.08000000000000007e141 or 4.0499999999999999e158 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 73.9%
if -1.08000000000000007e141 < x < 4.0499999999999999e158Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.2%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.45e+139) (* x (/ 60.0 (- z t))) (if (<= x 7.4e+158) (* a 120.0) (/ x (* (- z t) 0.016666666666666666)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e+139) {
tmp = x * (60.0 / (z - t));
} else if (x <= 7.4e+158) {
tmp = a * 120.0;
} else {
tmp = x / ((z - t) * 0.016666666666666666);
}
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 (x <= (-1.45d+139)) then
tmp = x * (60.0d0 / (z - t))
else if (x <= 7.4d+158) then
tmp = a * 120.0d0
else
tmp = x / ((z - t) * 0.016666666666666666d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e+139) {
tmp = x * (60.0 / (z - t));
} else if (x <= 7.4e+158) {
tmp = a * 120.0;
} else {
tmp = x / ((z - t) * 0.016666666666666666);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.45e+139: tmp = x * (60.0 / (z - t)) elif x <= 7.4e+158: tmp = a * 120.0 else: tmp = x / ((z - t) * 0.016666666666666666) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.45e+139) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (x <= 7.4e+158) tmp = Float64(a * 120.0); else tmp = Float64(x / Float64(Float64(z - t) * 0.016666666666666666)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.45e+139) tmp = x * (60.0 / (z - t)); elseif (x <= 7.4e+158) tmp = a * 120.0; else tmp = x / ((z - t) * 0.016666666666666666); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.45e+139], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.4e+158], N[(a * 120.0), $MachinePrecision], N[(x / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+139}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;x \leq 7.4 \cdot 10^{+158}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(z - t\right) \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if x < -1.4499999999999999e139Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 75.1%
associate-*r/75.1%
associate-*l/75.3%
*-commutative75.3%
Simplified75.3%
if -1.4499999999999999e139 < x < 7.40000000000000021e158Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.2%
if 7.40000000000000021e158 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 72.7%
metadata-eval72.7%
times-frac72.7%
*-un-lft-identity72.7%
*-commutative72.7%
Applied egg-rr72.7%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.76e+146) (* x (/ 60.0 (- z t))) (if (<= x 1.9e+159) (* a 120.0) (* 60.0 (/ x (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.76e+146) {
tmp = x * (60.0 / (z - t));
} else if (x <= 1.9e+159) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (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 (x <= (-1.76d+146)) then
tmp = x * (60.0d0 / (z - t))
else if (x <= 1.9d+159) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / (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 (x <= -1.76e+146) {
tmp = x * (60.0 / (z - t));
} else if (x <= 1.9e+159) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.76e+146: tmp = x * (60.0 / (z - t)) elif x <= 1.9e+159: tmp = a * 120.0 else: tmp = 60.0 * (x / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.76e+146) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (x <= 1.9e+159) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.76e+146) tmp = x * (60.0 / (z - t)); elseif (x <= 1.9e+159) tmp = a * 120.0; else tmp = 60.0 * (x / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.76e+146], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+159], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.76 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if x < -1.76000000000000007e146Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 75.1%
associate-*r/75.1%
associate-*l/75.3%
*-commutative75.3%
Simplified75.3%
if -1.76000000000000007e146 < x < 1.89999999999999983e159Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.2%
if 1.89999999999999983e159 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 72.7%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.95e+147) (not (<= x 2.35e+166))) (/ (* 60.0 x) z) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.95e+147) || !(x <= 2.35e+166)) {
tmp = (60.0 * x) / z;
} else {
tmp = a * 120.0;
}
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 ((x <= (-1.95d+147)) .or. (.not. (x <= 2.35d+166))) then
tmp = (60.0d0 * x) / z
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.95e+147) || !(x <= 2.35e+166)) {
tmp = (60.0 * x) / z;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.95e+147) or not (x <= 2.35e+166): tmp = (60.0 * x) / z else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.95e+147) || !(x <= 2.35e+166)) tmp = Float64(Float64(60.0 * x) / z); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.95e+147) || ~((x <= 2.35e+166))) tmp = (60.0 * x) / z; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.95e+147], N[Not[LessEqual[x, 2.35e+166]], $MachinePrecision]], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+147} \lor \neg \left(x \leq 2.35 \cdot 10^{+166}\right):\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.95000000000000008e147 or 2.35e166 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 74.6%
Taylor expanded in z around inf 41.7%
associate-*r/41.8%
Simplified41.8%
if -1.95000000000000008e147 < x < 2.35e166Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.1%
Final simplification58.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.9e+147) (not (<= x 4.3e+166))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.9e+147) || !(x <= 4.3e+166)) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
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 ((x <= (-4.9d+147)) .or. (.not. (x <= 4.3d+166))) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.9e+147) || !(x <= 4.3e+166)) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.9e+147) or not (x <= 4.3e+166): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.9e+147) || !(x <= 4.3e+166)) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.9e+147) || ~((x <= 4.3e+166))) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.9e+147], N[Not[LessEqual[x, 4.3e+166]], $MachinePrecision]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+147} \lor \neg \left(x \leq 4.3 \cdot 10^{+166}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.8999999999999998e147 or 4.3e166 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 74.6%
Taylor expanded in z around inf 41.7%
if -4.8999999999999998e147 < x < 4.3e166Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.1%
Final simplification58.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.9e+178) (not (<= x 1.8e+163))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.9e+178) || !(x <= 1.8e+163)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
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 ((x <= (-2.9d+178)) .or. (.not. (x <= 1.8d+163))) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.9e+178) || !(x <= 1.8e+163)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.9e+178) or not (x <= 1.8e+163): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.9e+178) || !(x <= 1.8e+163)) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.9e+178) || ~((x <= 1.8e+163))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.9e+178], N[Not[LessEqual[x, 1.8e+163]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+178} \lor \neg \left(x \leq 1.8 \cdot 10^{+163}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -2.9e178 or 1.79999999999999989e163 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
*-commutative99.7%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 76.0%
Taylor expanded in z around 0 38.8%
if -2.9e178 < x < 1.79999999999999989e163Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.4%
Final simplification57.1%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - 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 = (a * 120.0d0) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
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 = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.5%
Final simplification52.5%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
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 = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024139
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))