newton-api
newton-api copied to clipboard
find 0's not working properly
Hi,
I recently found this awesome API and had some fun with it. However, I had a bit of trouble in using the /zeroes
endpoint. Here are some of the failing use cases:
request: https://newton.now.sh/zeroes/x+30
response:
{
"operation": "zeroes",
"expression": "x+30",
"result": [
3
]
}
request: https://newton.now.sh/zeroes/x+3
response:
{
"operation": "zeroes",
"expression": "x+3",
"result": [
null
]
}
request: https://newton.now.sh/zeroes/x^2
response:
{
"operation": "zeroes",
"expression": "x^2",
"result": [
null
]
}
request: https://newton.now.sh/zeroes/x^2-2x+1
response:
{
"operation": "zeroes",
"expression": "x^2-2x+1",
"result": [
null
]
}
request: https://newton.now.sh/zeroes/x^2-2
response:
{
"operation": "zeroes",
"expression": "x^2-2",
"result": [
-2,
2
]
}
I acknowledge this. I just haven't made time to look into it yet.