
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (/ (+ 2.0 (/ 2.0 z)) t) (+ -2.0 (/ x y))))
double code(double x, double y, double z, double t) {
return ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((2.0d0 + (2.0d0 / z)) / t) + ((-2.0d0) + (x / y))
end function
public static double code(double x, double y, double z, double t) {
return ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y));
}
def code(x, y, z, t): return ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y))
function code(x, y, z, t) return Float64(Float64(Float64(2.0 + Float64(2.0 / z)) / t) + Float64(-2.0 + Float64(x / y))) end
function tmp = code(x, y, z, t) tmp = ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y)); end
code[x_, y_, z_, t_] := N[(N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2 + \frac{2}{z}}{t} + \left(-2 + \frac{x}{y}\right)
\end{array}
Initial program 88.1%
Simplified99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ 2.0 (* z t)))))
(if (<= (/ x y) -1e+130)
t_1
(if (<= (/ x y) -10000000.0)
(+ (/ x y) (+ -2.0 (/ 2.0 t)))
(if (<= (/ x y) 100000000000.0)
(+ (/ (+ 2.0 (/ 2.0 z)) t) -2.0)
t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / (z * t));
double tmp;
if ((x / y) <= -1e+130) {
tmp = t_1;
} else if ((x / y) <= -10000000.0) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else if ((x / y) <= 100000000000.0) {
tmp = ((2.0 + (2.0 / z)) / t) + -2.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + (2.0d0 / (z * t))
if ((x / y) <= (-1d+130)) then
tmp = t_1
else if ((x / y) <= (-10000000.0d0)) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / t))
else if ((x / y) <= 100000000000.0d0) then
tmp = ((2.0d0 + (2.0d0 / z)) / t) + (-2.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / (z * t));
double tmp;
if ((x / y) <= -1e+130) {
tmp = t_1;
} else if ((x / y) <= -10000000.0) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else if ((x / y) <= 100000000000.0) {
tmp = ((2.0 + (2.0 / z)) / t) + -2.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / (z * t)) tmp = 0 if (x / y) <= -1e+130: tmp = t_1 elif (x / y) <= -10000000.0: tmp = (x / y) + (-2.0 + (2.0 / t)) elif (x / y) <= 100000000000.0: tmp = ((2.0 + (2.0 / z)) / t) + -2.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))) tmp = 0.0 if (Float64(x / y) <= -1e+130) tmp = t_1; elseif (Float64(x / y) <= -10000000.0) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); elseif (Float64(x / y) <= 100000000000.0) tmp = Float64(Float64(Float64(2.0 + Float64(2.0 / z)) / t) + -2.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (2.0 / (z * t)); tmp = 0.0; if ((x / y) <= -1e+130) tmp = t_1; elseif ((x / y) <= -10000000.0) tmp = (x / y) + (-2.0 + (2.0 / t)); elseif ((x / y) <= 100000000000.0) tmp = ((2.0 + (2.0 / z)) / t) + -2.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -1e+130], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -10000000.0], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 100000000000.0], N[(N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + -2.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{z \cdot t}\\
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -10000000:\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{elif}\;\frac{x}{y} \leq 100000000000:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t} + -2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -1.0000000000000001e130 or 1e11 < (/.f64 x y) Initial program 88.0%
Taylor expanded in z around 0
Simplified92.7%
if -1.0000000000000001e130 < (/.f64 x y) < -1e7Initial program 77.6%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6494.8%
Simplified94.8%
if -1e7 < (/.f64 x y) < 1e11Initial program 89.7%
Simplified99.9%
Taylor expanded in x around 0
Simplified98.4%
Final simplification95.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ 2.0 t))))
(if (<= (/ x y) -6300000.0)
t_1
(if (<= (/ x y) -1.04e-54)
(/ 2.0 (* z t))
(if (<= (/ x y) 2.9e-7) (+ -2.0 (/ 2.0 t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if ((x / y) <= -6300000.0) {
tmp = t_1;
} else if ((x / y) <= -1.04e-54) {
tmp = 2.0 / (z * t);
} else if ((x / y) <= 2.9e-7) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + (2.0d0 / t)
if ((x / y) <= (-6300000.0d0)) then
tmp = t_1
else if ((x / y) <= (-1.04d-54)) then
tmp = 2.0d0 / (z * t)
else if ((x / y) <= 2.9d-7) then
tmp = (-2.0d0) + (2.0d0 / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if ((x / y) <= -6300000.0) {
tmp = t_1;
} else if ((x / y) <= -1.04e-54) {
tmp = 2.0 / (z * t);
} else if ((x / y) <= 2.9e-7) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / t) tmp = 0 if (x / y) <= -6300000.0: tmp = t_1 elif (x / y) <= -1.04e-54: tmp = 2.0 / (z * t) elif (x / y) <= 2.9e-7: tmp = -2.0 + (2.0 / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(2.0 / t)) tmp = 0.0 if (Float64(x / y) <= -6300000.0) tmp = t_1; elseif (Float64(x / y) <= -1.04e-54) tmp = Float64(2.0 / Float64(z * t)); elseif (Float64(x / y) <= 2.9e-7) tmp = Float64(-2.0 + Float64(2.0 / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (2.0 / t); tmp = 0.0; if ((x / y) <= -6300000.0) tmp = t_1; elseif ((x / y) <= -1.04e-54) tmp = 2.0 / (z * t); elseif ((x / y) <= 2.9e-7) tmp = -2.0 + (2.0 / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -6300000.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -1.04e-54], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2.9e-7], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{t}\\
\mathbf{if}\;\frac{x}{y} \leq -6300000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -1.04 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{elif}\;\frac{x}{y} \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -6.3e6 or 2.8999999999999998e-7 < (/.f64 x y) Initial program 87.2%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6483.2%
Simplified83.2%
Taylor expanded in t around 0
/-lowering-/.f6482.0%
Simplified82.0%
if -6.3e6 < (/.f64 x y) < -1.04e-54Initial program 99.8%
Taylor expanded in z around 0
associate-/l/N/A
metadata-evalN/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6480.5%
Simplified80.5%
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6480.7%
Applied egg-rr80.7%
if -1.04e-54 < (/.f64 x y) < 2.8999999999999998e-7Initial program 87.6%
Simplified99.9%
Taylor expanded in x around 0
Simplified99.5%
Taylor expanded in z around inf
Simplified66.0%
Final simplification75.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ x y))))
(if (<= t -0.042)
t_1
(if (<= t 1.6e-139)
(/ (+ 2.0 (/ 2.0 z)) t)
(if (<= t 7.3e-16) (+ (/ x y) (/ 2.0 t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if (t <= -0.042) {
tmp = t_1;
} else if (t <= 1.6e-139) {
tmp = (2.0 + (2.0 / z)) / t;
} else if (t <= 7.3e-16) {
tmp = (x / y) + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-2.0d0) + (x / y)
if (t <= (-0.042d0)) then
tmp = t_1
else if (t <= 1.6d-139) then
tmp = (2.0d0 + (2.0d0 / z)) / t
else if (t <= 7.3d-16) then
tmp = (x / y) + (2.0d0 / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if (t <= -0.042) {
tmp = t_1;
} else if (t <= 1.6e-139) {
tmp = (2.0 + (2.0 / z)) / t;
} else if (t <= 7.3e-16) {
tmp = (x / y) + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (x / y) tmp = 0 if t <= -0.042: tmp = t_1 elif t <= 1.6e-139: tmp = (2.0 + (2.0 / z)) / t elif t <= 7.3e-16: tmp = (x / y) + (2.0 / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(x / y)) tmp = 0.0 if (t <= -0.042) tmp = t_1; elseif (t <= 1.6e-139) tmp = Float64(Float64(2.0 + Float64(2.0 / z)) / t); elseif (t <= 7.3e-16) tmp = Float64(Float64(x / y) + Float64(2.0 / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -2.0 + (x / y); tmp = 0.0; if (t <= -0.042) tmp = t_1; elseif (t <= 1.6e-139) tmp = (2.0 + (2.0 / z)) / t; elseif (t <= 7.3e-16) tmp = (x / y) + (2.0 / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.042], t$95$1, If[LessEqual[t, 1.6e-139], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 7.3e-16], N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{x}{y}\\
\mathbf{if}\;t \leq -0.042:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-139}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\mathbf{elif}\;t \leq 7.3 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.0420000000000000026 or 7.3000000000000003e-16 < t Initial program 79.5%
Taylor expanded in t around inf
Simplified85.6%
if -0.0420000000000000026 < t < 1.6e-139Initial program 98.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6484.3%
Simplified84.3%
if 1.6e-139 < t < 7.3000000000000003e-16Initial program 99.7%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6479.6%
Simplified79.6%
Taylor expanded in t around 0
/-lowering-/.f6479.6%
Simplified79.6%
Final simplification84.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ 2.0 t))))
(if (<= (/ x y) -5900000.0)
t_1
(if (<= (/ x y) 2.9e-7) (+ -2.0 (/ (/ 2.0 z) t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if ((x / y) <= -5900000.0) {
tmp = t_1;
} else if ((x / y) <= 2.9e-7) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + (2.0d0 / t)
if ((x / y) <= (-5900000.0d0)) then
tmp = t_1
else if ((x / y) <= 2.9d-7) then
tmp = (-2.0d0) + ((2.0d0 / z) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if ((x / y) <= -5900000.0) {
tmp = t_1;
} else if ((x / y) <= 2.9e-7) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / t) tmp = 0 if (x / y) <= -5900000.0: tmp = t_1 elif (x / y) <= 2.9e-7: tmp = -2.0 + ((2.0 / z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(2.0 / t)) tmp = 0.0 if (Float64(x / y) <= -5900000.0) tmp = t_1; elseif (Float64(x / y) <= 2.9e-7) tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (2.0 / t); tmp = 0.0; if ((x / y) <= -5900000.0) tmp = t_1; elseif ((x / y) <= 2.9e-7) tmp = -2.0 + ((2.0 / z) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -5900000.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2.9e-7], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{t}\\
\mathbf{if}\;\frac{x}{y} \leq -5900000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -5.9e6 or 2.8999999999999998e-7 < (/.f64 x y) Initial program 87.2%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6483.2%
Simplified83.2%
Taylor expanded in t around 0
/-lowering-/.f6482.0%
Simplified82.0%
if -5.9e6 < (/.f64 x y) < 2.8999999999999998e-7Initial program 89.1%
Simplified99.9%
Taylor expanded in x around 0
Simplified99.1%
Taylor expanded in z around 0
/-lowering-/.f6480.2%
Simplified80.2%
Final simplification81.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (+ -2.0 (/ 2.0 t)))))
(if (<= z -1.08e-16)
t_1
(if (<= z 1.35e-20) (+ (/ x y) (/ 2.0 (* z t))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -1.08e-16) {
tmp = t_1;
} else if (z <= 1.35e-20) {
tmp = (x / y) + (2.0 / (z * t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + ((-2.0d0) + (2.0d0 / t))
if (z <= (-1.08d-16)) then
tmp = t_1
else if (z <= 1.35d-20) then
tmp = (x / y) + (2.0d0 / (z * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -1.08e-16) {
tmp = t_1;
} else if (z <= 1.35e-20) {
tmp = (x / y) + (2.0 / (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (-2.0 + (2.0 / t)) tmp = 0 if z <= -1.08e-16: tmp = t_1 elif z <= 1.35e-20: tmp = (x / y) + (2.0 / (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))) tmp = 0.0 if (z <= -1.08e-16) tmp = t_1; elseif (z <= 1.35e-20) tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (-2.0 + (2.0 / t)); tmp = 0.0; if (z <= -1.08e-16) tmp = t_1; elseif (z <= 1.35e-20) tmp = (x / y) + (2.0 / (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.08e-16], t$95$1, If[LessEqual[z, 1.35e-20], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.08e-16 or 1.35e-20 < z Initial program 78.5%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6498.5%
Simplified98.5%
if -1.08e-16 < z < 1.35e-20Initial program 99.0%
Taylor expanded in z around 0
Simplified84.3%
Final simplification91.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (+ -2.0 (/ 2.0 t))))) (if (<= z -3.1e-65) t_1 (if (<= z 2.1e-21) (+ -2.0 (/ (/ 2.0 z) t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -3.1e-65) {
tmp = t_1;
} else if (z <= 2.1e-21) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + ((-2.0d0) + (2.0d0 / t))
if (z <= (-3.1d-65)) then
tmp = t_1
else if (z <= 2.1d-21) then
tmp = (-2.0d0) + ((2.0d0 / z) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -3.1e-65) {
tmp = t_1;
} else if (z <= 2.1e-21) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (-2.0 + (2.0 / t)) tmp = 0 if z <= -3.1e-65: tmp = t_1 elif z <= 2.1e-21: tmp = -2.0 + ((2.0 / z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))) tmp = 0.0 if (z <= -3.1e-65) tmp = t_1; elseif (z <= 2.1e-21) tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (-2.0 + (2.0 / t)); tmp = 0.0; if (z <= -3.1e-65) tmp = t_1; elseif (z <= 2.1e-21) tmp = -2.0 + ((2.0 / z) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e-65], t$95$1, If[LessEqual[z, 2.1e-21], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-21}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.10000000000000016e-65 or 2.10000000000000013e-21 < z Initial program 81.0%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6493.5%
Simplified93.5%
if -3.10000000000000016e-65 < z < 2.10000000000000013e-21Initial program 98.9%
Simplified98.9%
Taylor expanded in x around 0
Simplified76.1%
Taylor expanded in z around 0
/-lowering-/.f6476.1%
Simplified76.1%
Final simplification86.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ x y))))
(if (<= (/ x y) -460.0)
t_1
(if (<= (/ x y) 36000000000.0) (+ -2.0 (/ 2.0 t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if ((x / y) <= -460.0) {
tmp = t_1;
} else if ((x / y) <= 36000000000.0) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-2.0d0) + (x / y)
if ((x / y) <= (-460.0d0)) then
tmp = t_1
else if ((x / y) <= 36000000000.0d0) then
tmp = (-2.0d0) + (2.0d0 / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if ((x / y) <= -460.0) {
tmp = t_1;
} else if ((x / y) <= 36000000000.0) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (x / y) tmp = 0 if (x / y) <= -460.0: tmp = t_1 elif (x / y) <= 36000000000.0: tmp = -2.0 + (2.0 / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(x / y)) tmp = 0.0 if (Float64(x / y) <= -460.0) tmp = t_1; elseif (Float64(x / y) <= 36000000000.0) tmp = Float64(-2.0 + Float64(2.0 / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -2.0 + (x / y); tmp = 0.0; if ((x / y) <= -460.0) tmp = t_1; elseif ((x / y) <= 36000000000.0) tmp = -2.0 + (2.0 / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -460.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 36000000000.0], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{x}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -460:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 36000000000:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -460 or 3.6e10 < (/.f64 x y) Initial program 86.7%
Taylor expanded in t around inf
Simplified73.0%
if -460 < (/.f64 x y) < 3.6e10Initial program 89.5%
Simplified99.9%
Taylor expanded in x around 0
Simplified98.4%
Taylor expanded in z around inf
Simplified60.2%
Final simplification66.6%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -6800000000000.0) (/ x y) (if (<= (/ x y) 36000000000.0) (+ -2.0 (/ 2.0 t)) (/ x y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -6800000000000.0) {
tmp = x / y;
} else if ((x / y) <= 36000000000.0) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x / y) <= (-6800000000000.0d0)) then
tmp = x / y
else if ((x / y) <= 36000000000.0d0) then
tmp = (-2.0d0) + (2.0d0 / t)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -6800000000000.0) {
tmp = x / y;
} else if ((x / y) <= 36000000000.0) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -6800000000000.0: tmp = x / y elif (x / y) <= 36000000000.0: tmp = -2.0 + (2.0 / t) else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -6800000000000.0) tmp = Float64(x / y); elseif (Float64(x / y) <= 36000000000.0) tmp = Float64(-2.0 + Float64(2.0 / t)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -6800000000000.0) tmp = x / y; elseif ((x / y) <= 36000000000.0) tmp = -2.0 + (2.0 / t); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -6800000000000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 36000000000.0], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -6800000000000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 36000000000:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -6.8e12 or 3.6e10 < (/.f64 x y) Initial program 87.1%
Taylor expanded in x around inf
/-lowering-/.f6473.5%
Simplified73.5%
if -6.8e12 < (/.f64 x y) < 3.6e10Initial program 89.1%
Simplified99.9%
Taylor expanded in x around 0
Simplified97.1%
Taylor expanded in z around inf
Simplified59.3%
Final simplification66.2%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -4.4e-5) (/ x y) (if (<= (/ x y) 0.0056) -2.0 (/ x y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -4.4e-5) {
tmp = x / y;
} else if ((x / y) <= 0.0056) {
tmp = -2.0;
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x / y) <= (-4.4d-5)) then
tmp = x / y
else if ((x / y) <= 0.0056d0) then
tmp = -2.0d0
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -4.4e-5) {
tmp = x / y;
} else if ((x / y) <= 0.0056) {
tmp = -2.0;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -4.4e-5: tmp = x / y elif (x / y) <= 0.0056: tmp = -2.0 else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -4.4e-5) tmp = Float64(x / y); elseif (Float64(x / y) <= 0.0056) tmp = -2.0; else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -4.4e-5) tmp = x / y; elseif ((x / y) <= 0.0056) tmp = -2.0; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -4.4e-5], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 0.0056], -2.0, N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -4.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 0.0056:\\
\;\;\;\;-2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -4.3999999999999999e-5 or 0.00559999999999999994 < (/.f64 x y) Initial program 87.5%
Taylor expanded in x around inf
/-lowering-/.f6468.3%
Simplified68.3%
if -4.3999999999999999e-5 < (/.f64 x y) < 0.00559999999999999994Initial program 88.9%
Simplified99.9%
Taylor expanded in x around 0
Simplified99.1%
Taylor expanded in t around inf
Simplified43.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ -2.0 (/ x y)))) (if (<= t -4.6e-95) t_1 (if (<= t 1.6e-139) (/ 2.0 (* z t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if (t <= -4.6e-95) {
tmp = t_1;
} else if (t <= 1.6e-139) {
tmp = 2.0 / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-2.0d0) + (x / y)
if (t <= (-4.6d-95)) then
tmp = t_1
else if (t <= 1.6d-139) then
tmp = 2.0d0 / (z * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if (t <= -4.6e-95) {
tmp = t_1;
} else if (t <= 1.6e-139) {
tmp = 2.0 / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (x / y) tmp = 0 if t <= -4.6e-95: tmp = t_1 elif t <= 1.6e-139: tmp = 2.0 / (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(x / y)) tmp = 0.0 if (t <= -4.6e-95) tmp = t_1; elseif (t <= 1.6e-139) tmp = Float64(2.0 / Float64(z * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -2.0 + (x / y); tmp = 0.0; if (t <= -4.6e-95) tmp = t_1; elseif (t <= 1.6e-139) tmp = 2.0 / (z * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e-95], t$95$1, If[LessEqual[t, 1.6e-139], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{x}{y}\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-139}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.59999999999999998e-95 or 1.6e-139 < t Initial program 83.6%
Taylor expanded in t around inf
Simplified77.5%
if -4.59999999999999998e-95 < t < 1.6e-139Initial program 98.5%
Taylor expanded in z around 0
associate-/l/N/A
metadata-evalN/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6453.5%
Simplified53.5%
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6453.5%
Applied egg-rr53.5%
Final simplification70.2%
(FPCore (x y z t) :precision binary64 (if (<= t -500.0) -2.0 (if (<= t 1.62e-15) (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -500.0) {
tmp = -2.0;
} else if (t <= 1.62e-15) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-500.0d0)) then
tmp = -2.0d0
else if (t <= 1.62d-15) then
tmp = 2.0d0 / t
else
tmp = -2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -500.0) {
tmp = -2.0;
} else if (t <= 1.62e-15) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -500.0: tmp = -2.0 elif t <= 1.62e-15: tmp = 2.0 / t else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -500.0) tmp = -2.0; elseif (t <= 1.62e-15) tmp = Float64(2.0 / t); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -500.0) tmp = -2.0; elseif (t <= 1.62e-15) tmp = 2.0 / t; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -500.0], -2.0, If[LessEqual[t, 1.62e-15], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -500:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if t < -500 or 1.62000000000000009e-15 < t Initial program 79.1%
Simplified99.9%
Taylor expanded in x around 0
Simplified51.9%
Taylor expanded in t around inf
Simplified37.8%
if -500 < t < 1.62000000000000009e-15Initial program 98.9%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6455.9%
Simplified55.9%
Taylor expanded in t around 0
/-lowering-/.f6433.4%
Simplified33.4%
(FPCore (x y z t) :precision binary64 -2.0)
double code(double x, double y, double z, double t) {
return -2.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -2.0d0
end function
public static double code(double x, double y, double z, double t) {
return -2.0;
}
def code(x, y, z, t): return -2.0
function code(x, y, z, t) return -2.0 end
function tmp = code(x, y, z, t) tmp = -2.0; end
code[x_, y_, z_, t_] := -2.0
\begin{array}{l}
\\
-2
\end{array}
Initial program 88.1%
Simplified99.5%
Taylor expanded in x around 0
Simplified63.7%
Taylor expanded in t around inf
Simplified21.6%
(FPCore (x y z t) :precision binary64 (- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y))))
double code(double x, double y, double z, double t) {
return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((2.0d0 / z) + 2.0d0) / t) - (2.0d0 - (x / y))
end function
public static double code(double x, double y, double z, double t) {
return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
}
def code(x, y, z, t): return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(2.0 / z) + 2.0) / t) - Float64(2.0 - Float64(x / y))) end
function tmp = code(x, y, z, t) tmp = (((2.0 / z) + 2.0) / t) - (2.0 - (x / y)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(2.0 / z), $MachinePrecision] + 2.0), $MachinePrecision] / t), $MachinePrecision] - N[(2.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{2}{z} + 2}{t} - \left(2 - \frac{x}{y}\right)
\end{array}
herbie shell --seed 2024138
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (/ 2 z) 2) t) (- 2 (/ x y))))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))