Closed ElectrifyPro closed 4 years ago
I recently discovered the sheer power of extending nerdamer's core functionality, and all I can say is that it's amazing. However, I encoutnered this issue when I created this extension function (usng Node.JS):
var core = nerdamer.getCore(), _ = core.PARSER, Symbol = core.Symbol; nerdamer.register({ name: 'rtd', visible: true, numargs: 1, build: function() { return function(a) { return _.multiply(a.clone(), _.divide(new Symbol(180), new Symbol(Math.PI))); }; }, });
...which is supposed to convert a number from radians to degrees.
Using Nerdamer's solve function like this:
nerdamer('solve(rtd(pi/2)=x, x)').toString()
...returns this:
[(3521555055/122925461)*pi]
...which isn't wrong, but looks a lot different from90. Could you perhaps look into this?
I figured out the issue; new Symbol('pi') is much different than new Symbol(Math.PI)
new Symbol('pi')
new Symbol(Math.PI)
I recently discovered the sheer power of extending nerdamer's core functionality, and all I can say is that it's amazing. However, I encoutnered this issue when I created this extension function (usng Node.JS):
...which is supposed to convert a number from radians to degrees.
Using Nerdamer's solve function like this:
...returns this:
...which isn't wrong, but looks a lot different from90. Could you perhaps look into this?