bradhowes / swift-math-parser

Math expression parser built with Point•Free's swift-parsing package

Home Page:https://bradhowes.github.io/swift-math-parser/documentation/mathparser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Factorial presents crash on returned nonpositive

BuddyDeveloping opened this issue · comments

I am testing the new factorial feature and for some or other reason anything that is not just a number (brackets and functions) produces an error if it is negative or zero. For example "(5x-6)!", "cos(π)!", "sin(4)!". Please note I have implied multiplication enabled.

Also I'm not sure if this is intended but when implied multiplication is enabled, the "!" has to be directly after a number/group instead of with a space.

Finally, I'm curious as to why the implied multiplication is set up to need spaces? Is there a way to have it without need to makes spaces as it seems to case a lot of different test cases with normal use.

Thanks for your time,
Chris
BuddyDeveloping