josdejong/mathjs

Rationalize giving error on 1/(x^-2)

Open

#1 724 ouverte le 27 janv. 2020

Voir sur GitHub
 (7 commentaires) (0 réactions) (0 assignés)JavaScript (1 298 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (13 832 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Running math.rationalize('1/(x^-2)') gives the error Cannot read property '1' of undefined.

However, running math.rationalize('1/(x^-1)') gives the result x as you'd expect.

I'm using mathjs 6.5.0. Haven't tested other versions.

Guide contributeur