herbie icon indicating copy to clipboard operation
herbie copied to clipboard

Doesn't works for sin(x)

Open preetishkakkar opened this issue 1 year ago • 2 comments

sin(x) should be ~ x for small values of x, but it seems like it doesn't work, can you please help me understand.

https://herbie.uwplse.org/demo/bb8aaeebcc7ce514f73105a07cbb932fc62b16fa.10eb16397304ba9e003d59ffd34803200ce7cfa6/graph.html

preetishkakkar avatar Jan 03 '24 23:01 preetishkakkar

You are right, sin(x) is equal to x for small values of x, and this is how sin(x) behaves in most math libraries too. That's why I think, as this is the default behavior of the sin function herbie does not find any rewrites.

bhargavkulk avatar Jan 04 '24 02:01 bhargavkulk

I don't understand. What do you mean by because of default behavior herbie doesn't find rewrite?

preetishkakkar avatar Jan 04 '24 04:01 preetishkakkar

This was fixed (just confirmed), I believe in #746.

pavpanchekha avatar Jun 06 '24 17:06 pavpanchekha