Experience-Monks / math-as-code

a cheat-sheet for mathematical notation in code form
MIT License
14.98k stars 1.07k forks source link

fix complex-number typo #41

Closed chocolateboy closed 5 years ago

mattdesl commented 8 years ago

Thanks.

If you run the code it actually does produce this:

var math = require('mathjs')
math.sqrt(-1)
//=> { [String: 'i'] re: 0, im: 1 }
chocolateboy commented 5 years ago

It looks like a few documentation tweaks and fixes have been merged recently. Is there something blocking this one in particular? Just tried it with the latest version of mathjs (6.0.2):

REPL

mathjs.sqrt(-1)
// { re: 0, im: 1 }

README

var b = math.sqrt(-1)
//=> { re: 0, im: -1 }
mattdesl commented 5 years ago

:+1: Good call! Somehow I missed this.