| Alternative 1 | |
|---|---|
| Accuracy | 100.0% |
| Cost | 13120 |
\[\cos x \cdot \frac{\sinh y}{y}
\]
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
(FPCore (x y) :precision binary64 (/ (cos x) (/ y (sinh y))))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
double code(double x, double y) {
return cos(x) / (y / sinh(y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) / (y / sinh(y))
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
public static double code(double x, double y) {
return Math.cos(x) / (y / Math.sinh(y));
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
def code(x, y): return math.cos(x) / (y / math.sinh(y))
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function code(x, y) return Float64(cos(x) / Float64(y / sinh(y))) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
function tmp = code(x, y) tmp = cos(x) / (y / sinh(y)); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] / N[(y / N[Sinh[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\cos x \cdot \frac{\sinh y}{y}
\frac{\cos x}{\frac{y}{\sinh y}}
Results
Initial program 100.0%
Applied egg-rr100.0%
[Start]100.0 | \[ \cos x \cdot \frac{\sinh y}{y}
\] |
|---|---|
clear-num [=>]100.0 | \[ \cos x \cdot \color{blue}{\frac{1}{\frac{y}{\sinh y}}}
\] |
un-div-inv [=>]100.0 | \[ \color{blue}{\frac{\cos x}{\frac{y}{\sinh y}}}
\] |
Final simplification100.0%
| Alternative 1 | |
|---|---|
| Accuracy | 100.0% |
| Cost | 13120 |
| Alternative 2 | |
|---|---|
| Accuracy | 98.8% |
| Cost | 6976 |
| Alternative 3 | |
|---|---|
| Accuracy | 98.3% |
| Cost | 6464 |
| Alternative 4 | |
|---|---|
| Accuracy | 53.7% |
| Cost | 448 |
| Alternative 5 | |
|---|---|
| Accuracy | 53.5% |
| Cost | 64 |
herbie shell --seed 2023146
(FPCore (x y)
:name "Linear.Quaternion:$csin from linear-1.19.1.3"
:precision binary64
(* (cos x) (/ (sinh y) y)))