newton-api icon indicating copy to clipboard operation
newton-api copied to clipboard

find 0's not working properly

Open CristianoYL opened this issue 6 years ago • 1 comments

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
    ]
}

CristianoYL avatar Apr 13 '18 15:04 CristianoYL

I acknowledge this. I just haven't made time to look into it yet.

aunyks avatar May 24 '21 16:05 aunyks