Skip to content

find 0's not working properly #12

@CristianoYL

Description

@CristianoYL

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions