Skip to content

Questions about functions using commas and ** operator #18

@New0

Description

@New0

Hello and thank you for publishing the package.

I've been trying pow() and log() with two parameters but the , returned the Unknown token exception.

The ** operator returned a Syntax error exception.

Code example

$parser = new StdMathParser();
$AST = $parser->parse( 'pow(33,10)' );
$evaluator = new Evaluator();
//$total returns the exceptions explained above
$total = $AST->accept($evaluator);
$parser = new StdMathParser();
$AST = $parser->parse( '3**10' );
$evaluator = new Evaluator();
//$total returns the exceptions explained above
$total = $AST->accept($evaluator);

Did I forget a step for those scenarios ?
All the other math functions and operator work as expected in my case.
Thanks again

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions