OpenWaterAnalytics / epanet-msx

multi-species extension to epanet
MIT License
13 stars 18 forks source link

parsing exponents #1

Open jamesuber opened 9 years ago

jamesuber commented 9 years ago

MSX doesn't parse the following formula expression

FORMULA Xn X0_(2.71828^(-kb_t))

In this case you should really be using exp(-kb*t) but that's besides the point.

bradleyjeck commented 9 years ago

I also noticed this problem, in my case i was computing the exponent as part of a [TERM]. Is there a way to check the terms to see they are calculated correctly?

samhatchett commented 6 years ago

i'm looking at https://github.com/OpenWaterAnalytics/epanet-msx/blob/a7ffb10ff2034eb9e2da1119fba9ae0fc02ad999/src/mathexpr.c#L392

... probably something there that could be tweaked?