
(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 81.9%
Simplified99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ x y))))
(if (<= z -2.8e+190)
t_1
(if (<= z -3.5e+103)
(+ -2.0 (/ 2.0 t))
(if (<= z -9e-21) t_1 (if (<= z 3.4e-102) (/ (/ 2.0 t) z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if (z <= -2.8e+190) {
tmp = t_1;
} else if (z <= -3.5e+103) {
tmp = -2.0 + (2.0 / t);
} else if (z <= -9e-21) {
tmp = t_1;
} else if (z <= 3.4e-102) {
tmp = (2.0 / t) / z;
} 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 (z <= (-2.8d+190)) then
tmp = t_1
else if (z <= (-3.5d+103)) then
tmp = (-2.0d0) + (2.0d0 / t)
else if (z <= (-9d-21)) then
tmp = t_1
else if (z <= 3.4d-102) then
tmp = (2.0d0 / t) / z
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 (z <= -2.8e+190) {
tmp = t_1;
} else if (z <= -3.5e+103) {
tmp = -2.0 + (2.0 / t);
} else if (z <= -9e-21) {
tmp = t_1;
} else if (z <= 3.4e-102) {
tmp = (2.0 / t) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (x / y) tmp = 0 if z <= -2.8e+190: tmp = t_1 elif z <= -3.5e+103: tmp = -2.0 + (2.0 / t) elif z <= -9e-21: tmp = t_1 elif z <= 3.4e-102: tmp = (2.0 / t) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(x / y)) tmp = 0.0 if (z <= -2.8e+190) tmp = t_1; elseif (z <= -3.5e+103) tmp = Float64(-2.0 + Float64(2.0 / t)); elseif (z <= -9e-21) tmp = t_1; elseif (z <= 3.4e-102) tmp = Float64(Float64(2.0 / t) / z); 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 (z <= -2.8e+190) tmp = t_1; elseif (z <= -3.5e+103) tmp = -2.0 + (2.0 / t); elseif (z <= -9e-21) tmp = t_1; elseif (z <= 3.4e-102) tmp = (2.0 / t) / z; 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[z, -2.8e+190], t$95$1, If[LessEqual[z, -3.5e+103], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-21], t$95$1, If[LessEqual[z, 3.4e-102], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{x}{y}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+103}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-102}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.79999999999999997e190 or -3.5e103 < z < -8.99999999999999936e-21 or 3.40000000000000013e-102 < z Initial program 72.9%
Taylor expanded in t around inf
Simplified67.9%
if -2.79999999999999997e190 < z < -3.5e103Initial program 70.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-/.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6488.0%
Simplified88.0%
if -8.99999999999999936e-21 < z < 3.40000000000000013e-102Initial program 97.7%
Taylor expanded in z around 0
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6476.2%
Simplified76.2%
Final simplification72.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ x y))))
(if (<= z -1.18e+207)
t_1
(if (<= z -3.4e+103)
(+ -2.0 (/ 2.0 t))
(if (<= z -5.6e-21) t_1 (if (<= z 5.8e-107) (/ 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 (z <= -1.18e+207) {
tmp = t_1;
} else if (z <= -3.4e+103) {
tmp = -2.0 + (2.0 / t);
} else if (z <= -5.6e-21) {
tmp = t_1;
} else if (z <= 5.8e-107) {
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 (z <= (-1.18d+207)) then
tmp = t_1
else if (z <= (-3.4d+103)) then
tmp = (-2.0d0) + (2.0d0 / t)
else if (z <= (-5.6d-21)) then
tmp = t_1
else if (z <= 5.8d-107) 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 (z <= -1.18e+207) {
tmp = t_1;
} else if (z <= -3.4e+103) {
tmp = -2.0 + (2.0 / t);
} else if (z <= -5.6e-21) {
tmp = t_1;
} else if (z <= 5.8e-107) {
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 z <= -1.18e+207: tmp = t_1 elif z <= -3.4e+103: tmp = -2.0 + (2.0 / t) elif z <= -5.6e-21: tmp = t_1 elif z <= 5.8e-107: 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 (z <= -1.18e+207) tmp = t_1; elseif (z <= -3.4e+103) tmp = Float64(-2.0 + Float64(2.0 / t)); elseif (z <= -5.6e-21) tmp = t_1; elseif (z <= 5.8e-107) 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 (z <= -1.18e+207) tmp = t_1; elseif (z <= -3.4e+103) tmp = -2.0 + (2.0 / t); elseif (z <= -5.6e-21) tmp = t_1; elseif (z <= 5.8e-107) 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[z, -1.18e+207], t$95$1, If[LessEqual[z, -3.4e+103], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.6e-21], t$95$1, If[LessEqual[z, 5.8e-107], 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}\;z \leq -1.18 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{+103}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-107}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.18e207 or -3.3999999999999998e103 < z < -5.60000000000000008e-21 or 5.7999999999999996e-107 < z Initial program 72.9%
Taylor expanded in t around inf
Simplified67.9%
if -1.18e207 < z < -3.3999999999999998e103Initial program 70.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-/.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6488.0%
Simplified88.0%
if -5.60000000000000008e-21 < z < 5.7999999999999996e-107Initial program 97.7%
Taylor expanded in z around 0
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6476.2%
Simplified76.2%
associate-/r*N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.2%
Applied egg-rr76.2%
Final simplification72.9%
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -5e+34)
(/ x y)
(if (<= (/ x y) -4e-290)
(/ 2.0 t)
(if (<= (/ x y) 20000000000.0) -2.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -5e+34) {
tmp = x / y;
} else if ((x / y) <= -4e-290) {
tmp = 2.0 / t;
} else if ((x / y) <= 20000000000.0) {
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) <= (-5d+34)) then
tmp = x / y
else if ((x / y) <= (-4d-290)) then
tmp = 2.0d0 / t
else if ((x / y) <= 20000000000.0d0) 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) <= -5e+34) {
tmp = x / y;
} else if ((x / y) <= -4e-290) {
tmp = 2.0 / t;
} else if ((x / y) <= 20000000000.0) {
tmp = -2.0;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -5e+34: tmp = x / y elif (x / y) <= -4e-290: tmp = 2.0 / t elif (x / y) <= 20000000000.0: tmp = -2.0 else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -5e+34) tmp = Float64(x / y); elseif (Float64(x / y) <= -4e-290) tmp = Float64(2.0 / t); elseif (Float64(x / y) <= 20000000000.0) 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) <= -5e+34) tmp = x / y; elseif ((x / y) <= -4e-290) tmp = 2.0 / t; elseif ((x / y) <= 20000000000.0) tmp = -2.0; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -5e+34], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -4e-290], N[(2.0 / t), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 20000000000.0], -2.0, N[(x / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq -4 \cdot 10^{-290}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 20000000000:\\
\;\;\;\;-2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -4.9999999999999998e34 or 2e10 < (/.f64 x y) Initial program 78.1%
Taylor expanded in x around inf
/-lowering-/.f6469.8%
Simplified69.8%
if -4.9999999999999998e34 < (/.f64 x y) < -4.0000000000000003e-290Initial program 88.3%
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-/.f6457.3%
Simplified57.3%
Taylor expanded in t around 0
/-lowering-/.f6436.2%
Simplified36.2%
if -4.0000000000000003e-290 < (/.f64 x y) < 2e10Initial program 81.9%
Simplified100.0%
Taylor expanded in x around 0
Simplified100.0%
Taylor expanded in t around inf
Simplified39.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (+ -2.0 (/ 2.0 t)))))
(if (<= z -1.06e-20)
t_1
(if (<= z 0.035) (+ (/ 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.06e-20) {
tmp = t_1;
} else if (z <= 0.035) {
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.06d-20)) then
tmp = t_1
else if (z <= 0.035d0) 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.06e-20) {
tmp = t_1;
} else if (z <= 0.035) {
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.06e-20: tmp = t_1 elif z <= 0.035: 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.06e-20) tmp = t_1; elseif (z <= 0.035) 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.06e-20) tmp = t_1; elseif (z <= 0.035) 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.06e-20], t$95$1, If[LessEqual[z, 0.035], 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.06 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.035:\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.06e-20 or 0.035000000000000003 < z Initial program 69.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-/.f6499.1%
Simplified99.1%
if -1.06e-20 < z < 0.035000000000000003Initial program 98.1%
Taylor expanded in z around 0
Simplified90.9%
Final simplification95.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (+ -2.0 (/ 2.0 t))))) (if (<= z -1.8e-17) t_1 (if (<= z 1.5e-102) (+ -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 <= -1.8e-17) {
tmp = t_1;
} else if (z <= 1.5e-102) {
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 <= (-1.8d-17)) then
tmp = t_1
else if (z <= 1.5d-102) 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 <= -1.8e-17) {
tmp = t_1;
} else if (z <= 1.5e-102) {
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 <= -1.8e-17: tmp = t_1 elif z <= 1.5e-102: 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 <= -1.8e-17) tmp = t_1; elseif (z <= 1.5e-102) 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 <= -1.8e-17) tmp = t_1; elseif (z <= 1.5e-102) 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, -1.8e-17], t$95$1, If[LessEqual[z, 1.5e-102], 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 -1.8 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-102}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.79999999999999997e-17 or 1.5e-102 < z Initial program 72.4%
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-/.f6495.2%
Simplified95.2%
if -1.79999999999999997e-17 < z < 1.5e-102Initial program 97.8%
Simplified97.8%
Taylor expanded in x around 0
Simplified83.0%
Taylor expanded in z around 0
/-lowering-/.f6483.0%
Simplified83.0%
Final simplification90.6%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -5e+34) (/ x y) (if (<= (/ x y) 20000000000.0) (+ -2.0 (/ 2.0 t)) (+ -2.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -5e+34) {
tmp = x / y;
} else if ((x / y) <= 20000000000.0) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = -2.0 + (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) <= (-5d+34)) then
tmp = x / y
else if ((x / y) <= 20000000000.0d0) then
tmp = (-2.0d0) + (2.0d0 / t)
else
tmp = (-2.0d0) + (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) <= -5e+34) {
tmp = x / y;
} else if ((x / y) <= 20000000000.0) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = -2.0 + (x / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -5e+34: tmp = x / y elif (x / y) <= 20000000000.0: tmp = -2.0 + (2.0 / t) else: tmp = -2.0 + (x / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -5e+34) tmp = Float64(x / y); elseif (Float64(x / y) <= 20000000000.0) tmp = Float64(-2.0 + Float64(2.0 / t)); else tmp = Float64(-2.0 + Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -5e+34) tmp = x / y; elseif ((x / y) <= 20000000000.0) tmp = -2.0 + (2.0 / t); else tmp = -2.0 + (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -5e+34], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 20000000000.0], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 20000000000:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -4.9999999999999998e34Initial program 79.0%
Taylor expanded in x around inf
/-lowering-/.f6474.0%
Simplified74.0%
if -4.9999999999999998e34 < (/.f64 x y) < 2e10Initial program 85.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-/.f6460.0%
Simplified60.0%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6458.8%
Simplified58.8%
if 2e10 < (/.f64 x y) Initial program 77.0%
Taylor expanded in t around inf
Simplified65.9%
Final simplification64.1%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -5e+34) (/ x y) (if (<= (/ x y) 1e+90) (+ -2.0 (/ 2.0 t)) (/ x y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -5e+34) {
tmp = x / y;
} else if ((x / y) <= 1e+90) {
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) <= (-5d+34)) then
tmp = x / y
else if ((x / y) <= 1d+90) 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) <= -5e+34) {
tmp = x / y;
} else if ((x / y) <= 1e+90) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -5e+34: tmp = x / y elif (x / y) <= 1e+90: 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) <= -5e+34) tmp = Float64(x / y); elseif (Float64(x / y) <= 1e+90) 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) <= -5e+34) tmp = x / y; elseif ((x / y) <= 1e+90) 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], -5e+34], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1e+90], 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 -5 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+90}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -4.9999999999999998e34 or 9.99999999999999966e89 < (/.f64 x y) Initial program 78.6%
Taylor expanded in x around inf
/-lowering-/.f6472.5%
Simplified72.5%
if -4.9999999999999998e34 < (/.f64 x y) < 9.99999999999999966e89Initial program 84.3%
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-/.f6462.3%
Simplified62.3%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6457.9%
Simplified57.9%
Final simplification64.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ -2.0 (/ x y)))) (if (<= t -1.7e+48) t_1 (if (<= t 2.3e+14) (/ (+ 2.0 (/ 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 <= -1.7e+48) {
tmp = t_1;
} else if (t <= 2.3e+14) {
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 = (-2.0d0) + (x / y)
if (t <= (-1.7d+48)) then
tmp = t_1
else if (t <= 2.3d+14) 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 = -2.0 + (x / y);
double tmp;
if (t <= -1.7e+48) {
tmp = t_1;
} else if (t <= 2.3e+14) {
tmp = (2.0 + (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 <= -1.7e+48: tmp = t_1 elif t <= 2.3e+14: tmp = (2.0 + (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 <= -1.7e+48) tmp = t_1; elseif (t <= 2.3e+14) tmp = Float64(Float64(2.0 + Float64(2.0 / 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 <= -1.7e+48) tmp = t_1; elseif (t <= 2.3e+14) 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[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+48], t$95$1, If[LessEqual[t, 2.3e+14], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{x}{y}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+14}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.7000000000000002e48 or 2.3e14 < t Initial program 61.7%
Taylor expanded in t around inf
Simplified86.8%
if -1.7000000000000002e48 < t < 2.3e14Initial program 98.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6482.4%
Simplified82.4%
Final simplification84.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (/ 2.0 t)))) (if (<= z -3.8e-18) t_1 (if (<= z 7.6e-61) (+ -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 (z <= -3.8e-18) {
tmp = t_1;
} else if (z <= 7.6e-61) {
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 (z <= (-3.8d-18)) then
tmp = t_1
else if (z <= 7.6d-61) 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 (z <= -3.8e-18) {
tmp = t_1;
} else if (z <= 7.6e-61) {
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 z <= -3.8e-18: tmp = t_1 elif z <= 7.6e-61: 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 (z <= -3.8e-18) tmp = t_1; elseif (z <= 7.6e-61) 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 (z <= -3.8e-18) tmp = t_1; elseif (z <= 7.6e-61) 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[z, -3.8e-18], t$95$1, If[LessEqual[z, 7.6e-61], 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}\;z \leq -3.8 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-61}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.7999999999999998e-18 or 7.59999999999999961e-61 < z Initial program 70.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-/.f6497.4%
Simplified97.4%
Taylor expanded in t around 0
/-lowering-/.f6475.8%
Simplified75.8%
if -3.7999999999999998e-18 < z < 7.59999999999999961e-61Initial program 97.9%
Simplified97.9%
Taylor expanded in x around 0
Simplified80.7%
Taylor expanded in z around 0
/-lowering-/.f6480.7%
Simplified80.7%
Final simplification77.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (/ 2.0 t)))) (if (<= z -4.3e-18) t_1 (if (<= z 2.1e-104) (/ (/ 2.0 t) z) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if (z <= -4.3e-18) {
tmp = t_1;
} else if (z <= 2.1e-104) {
tmp = (2.0 / t) / z;
} 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 (z <= (-4.3d-18)) then
tmp = t_1
else if (z <= 2.1d-104) then
tmp = (2.0d0 / t) / z
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 (z <= -4.3e-18) {
tmp = t_1;
} else if (z <= 2.1e-104) {
tmp = (2.0 / t) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / t) tmp = 0 if z <= -4.3e-18: tmp = t_1 elif z <= 2.1e-104: tmp = (2.0 / t) / z 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 (z <= -4.3e-18) tmp = t_1; elseif (z <= 2.1e-104) tmp = Float64(Float64(2.0 / t) / z); 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 (z <= -4.3e-18) tmp = t_1; elseif (z <= 2.1e-104) tmp = (2.0 / t) / z; 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[z, -4.3e-18], t$95$1, If[LessEqual[z, 2.1e-104], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{t}\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-104}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.3000000000000002e-18 or 2.09999999999999999e-104 < z Initial program 72.4%
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-/.f6495.2%
Simplified95.2%
Taylor expanded in t around 0
/-lowering-/.f6474.2%
Simplified74.2%
if -4.3000000000000002e-18 < z < 2.09999999999999999e-104Initial program 97.8%
Taylor expanded in z around 0
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6475.5%
Simplified75.5%
(FPCore (x y z t) :precision binary64 (if (<= t -1.0) -2.0 (if (<= t 1.0) (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.0) {
tmp = -2.0;
} else if (t <= 1.0) {
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 <= (-1.0d0)) then
tmp = -2.0d0
else if (t <= 1.0d0) 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 <= -1.0) {
tmp = -2.0;
} else if (t <= 1.0) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.0: tmp = -2.0 elif t <= 1.0: tmp = 2.0 / t else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.0) tmp = -2.0; elseif (t <= 1.0) 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 <= -1.0) tmp = -2.0; elseif (t <= 1.0) tmp = 2.0 / t; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.0], -2.0, If[LessEqual[t, 1.0], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 1:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if t < -1 or 1 < t Initial program 63.9%
Simplified99.9%
Taylor expanded in x around 0
Simplified48.7%
Taylor expanded in t around inf
Simplified33.3%
if -1 < t < 1Initial program 98.3%
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-/.f6454.9%
Simplified54.9%
Taylor expanded in t around 0
/-lowering-/.f6438.7%
Simplified38.7%
(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 81.9%
Simplified99.1%
Taylor expanded in x around 0
Simplified67.6%
Taylor expanded in t around inf
Simplified17.1%
(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 2024160
(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))))