tinyexpr icon indicating copy to clipboard operation
tinyexpr copied to clipboard

Feature request: Add define to change return value from double to long double

Open PQCraft opened this issue 3 years ago • 6 comments

PQCraft avatar Mar 15 '22 12:03 PQCraft

Quick question: does Tinyexpr evaluate "Sum (expr)" ? thank you

aeonSolutions avatar Mar 21 '23 13:03 aeonSolutions

Quick question: does Tinyexpr evaluate "Sum (expr)" ? thank you

I don't understand what you're asking, or how it's related to this feature request.

codeplea avatar Mar 21 '23 14:03 codeplea

my apologies. Is not related, However, I was not able to find such information.

Can you tell me if TinyExpr is able to evaluate summation, Σ (sigma) to calculate a sum of multiple terms? thank you

aeonSolutions avatar Mar 21 '23 14:03 aeonSolutions

Can you tell me if TinyExpr is able to evaluate summation, Σ (sigma) to calculate a sum of multiple terms?

No, not directly. You can do "term1 + term2 + term3". And it would be easy to add sigma, as it's easy to add any function.

codeplea avatar Mar 21 '23 15:03 codeplea

my model is this one Σ [ (Temp- (-10))*dtime ]

where Temp is a temperature variable and time is a delta time in hours

it would be awesome if tinyexpr was able to compute it

aeonSolutions avatar Mar 23 '23 14:03 aeonSolutions

Check out the documentation at: https://github.com/codeplea/tinyexpr#binding-to-custom-functions

You can add in any custom function you like.

codeplea avatar Mar 23 '23 17:03 codeplea