
(FPCore (z0) :precision binary64 (sin (* PI z0)))
double code(double z0) {
return sin((((double) M_PI) * z0));
}
public static double code(double z0) {
return Math.sin((Math.PI * z0));
}
def code(z0): return math.sin((math.pi * z0))
function code(z0) return sin(Float64(pi * z0)) end
function tmp = code(z0) tmp = sin((pi * z0)); end
code[z0_] := N[Sin[N[(Pi * z0), $MachinePrecision]], $MachinePrecision]
\sin \left(\pi \cdot z0\right)
Herbie found 1 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (z0) :precision binary64 (sin (* PI z0)))
double code(double z0) {
return sin((((double) M_PI) * z0));
}
public static double code(double z0) {
return Math.sin((Math.PI * z0));
}
def code(z0): return math.sin((math.pi * z0))
function code(z0) return sin(Float64(pi * z0)) end
function tmp = code(z0) tmp = sin((pi * z0)); end
code[z0_] := N[Sin[N[(Pi * z0), $MachinePrecision]], $MachinePrecision]
\sin \left(\pi \cdot z0\right)
herbie shell --seed 2025271 -o generate:taylor -o generate:evaluate
(FPCore (z0)
:name "(sin (* PI z0))"
:precision binary64
(sin (* PI z0)))