GithubHelp home page GithubHelp logo

Comments (7)

evykassirer avatar evykassirer commented on July 4, 2024 1

Sounds good! This should all go in hasUnsupportedNodes I think :)

from mathsteps.

shirleymiao avatar shirleymiao commented on July 4, 2024 1

#121

from mathsteps.

evykassirer avatar evykassirer commented on July 4, 2024 1

done! thanks @shirleymiao

from mathsteps.

kevinbarabash avatar kevinbarabash commented on July 4, 2024

Does mathjs not return a parse error when it sees nthRoot( )?

from mathsteps.

evykassirer avatar evykassirer commented on July 4, 2024

it doesn't :(

I believe it's 'cause it parses it as a FunctionNode and those don't have to have arguments. This only becomes an error when you try to evaluate the FunctionNode and it treats it specifically as a root function

@josdejong thoughts?

also a fix here could be in hasUnsupportedNodes.js, make sure that nthroot nodes have exactly 1 or 2 arguments

from mathsteps.

kevinbarabash avatar kevinbarabash commented on July 4, 2024

Thinking about this some more – not returning a parse error makes sense b/c how many arguments nthRoot requires is a semantic issue. We could do some kind of semantic sanity check on the parse tree. It might also make sense to also check if the argument(s) produces a result within the reals, e.g. nthroot(-1,2).

from mathsteps.

evykassirer avatar evykassirer commented on July 4, 2024

(and this would make a great first PR ^^)

from mathsteps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.