josdejong/mathjs

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

Aberta

#1.724 aberto em 27 de jan. de 2020

 (7 comentários) (0 reação) (0 responsável)JavaScript (1.314 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (15.065 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

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.

Guia do colaborador