Mathias Bavay
96b85c1a77
Fixed for the old issue #34
...
As I got hit with the same issue when compiling tinyexpr on Windows with QtCreator (that itself was calling Visual C++ 2017 in the background) and realized that there was a solution in the issue's thread but no fix in the source code, I've implemented it (wrapped with ifdef to prevent warnings on other platforms).
2021-08-16 17:55:49 +02:00
Mathias Bavay
85733a1ef2
Added an SPDX license identifier
2021-06-17 15:57:22 +02:00
Lewis Van Winkle
61af1dd24c
fully allow upper-case letters in variable names
2021-03-03 16:20:38 -06:00
giacomo-b
1ca3587ffa
Accepted upper case letters
...
Introduced isalpha() from <ctype.h> to check if a character belongs to the alphabet. Previously, only lower case letters were allowed.
2021-03-03 20:08:39 +01:00
Lewis Van Winkle
a8f9bd99c2
extra test cases and general cleanup
2020-10-02 17:27:26 -05:00
Lewis Van Winkle
ffb0d41b13
year bump
2018-05-10 21:40:53 -05:00
nicolasdanet
0562ea39f4
Avoid fall through warnings
2018-05-09 07:44:42 +02:00
EvilPudding
6617027774
Fixed warning when compiling with strict prototypes
2018-05-09 00:35:28 +01:00
Lewis Van Winkle
bc132d5715
Merge branch 'master' of https://github.com/codeplea/tinyexpr
2017-04-03 13:07:48 -05:00
Lewis Van Winkle
ce9d1e5d4e
fixed compiler warning
2017-04-03 13:07:32 -05:00
chendotjs
f11d02f9a9
add ncr and npr
2017-03-26 22:30:08 +08:00
chendotjs
8cc2313ea4
fix overflow check bug
2017-03-16 20:50:10 +08:00
chendotjs
94fe42391c
add fac and infs/combinatoric test
2017-03-15 18:25:37 +08:00
nicolasdanet
24b8c41f8b
Avoid missing initializer warnings
2017-02-07 10:43:32 +01:00
Lewis Van Winkle
5bb556038d
Added support for underscore in variable names.
2016-11-28 18:20:10 -06:00
Lewis Van Winkle
2d58ae9fb2
Changed the way POW_FROM_RIGHT works with negative constants.
2016-08-23 15:05:59 -05:00
Lewis Van Winkle
f70b786ec2
Added TE_NAT_LOG option.
2016-08-22 21:23:16 -05:00
Lewis Van Winkle
af6c47ef28
Added option TE_POW_FROM_RIGHT
2016-08-22 21:20:28 -05:00
Lewis Van Winkle
52a46baabc
Merge pull request #9 from EvilPudding/master
...
Minor optimization
2016-08-22 19:20:25 -05:00
Lewis Van Winkle
ec7dc3a28a
Allow whitespace at end of expression.
2016-08-22 19:09:21 -05:00
Lewis Van Winkle
4c1015ab7f
Make the te_expr struct valid C++ code.
2016-08-22 19:06:40 -05:00
EvilPudding
d49e4e9af8
Minor optimization
2016-06-02 23:56:13 +00:00
Lewis Van Winkle
860b8ff199
Bug fix on some bad expressions.
2016-06-02 12:09:58 -05:00
Lewis Van Winkle
5e3b8f2ee3
Uses NAN macro if defined.
2016-05-25 12:17:39 -05:00
Lewis Van Winkle
cf03962b1c
Moved pi and e into functions to allow compile time optimization.
2016-02-26 18:09:44 -06:00
Lewis Van Winkle
8e7c788313
Got optimize working. Added TE_FLAG_PURE.
2016-02-26 17:35:39 -06:00
Lewis Van Winkle
7550e4e309
Refactored closure context storage.
2016-02-25 14:02:44 -06:00
Lewis Van Winkle
a44620f187
Context for closures is now stored separately for each closure.
2016-02-25 13:34:58 -06:00
Lewis Van Winkle
04134389f2
Closure bug fix.
2016-02-24 22:56:57 -06:00
Lewis Van Winkle
b24086b376
Added closures. Refactoring.
2016-02-24 22:26:54 -06:00
Lewis Van Winkle
75daaf891a
Refactoring.
2016-02-24 19:02:19 -06:00
Lewis Van Winkle
db29d5ad73
Removed unused mask.
2016-02-24 18:45:35 -06:00
Lewis Van Winkle
fc3cee3fb1
Refactoring.
2016-02-24 18:45:00 -06:00
EvilPudding
8a8fe5ba4f
Merge branch 'dynfunc' of https://github.com/codeplea/tinyexpr
2016-02-24 20:19:05 +00:00
EvilPudding
bda6fa9d30
Fixed memory leaks and uninitialized values.
2016-02-24 20:15:47 +00:00
Lewis Van Winkle
31782a849f
Bug fix in list grammar.
2016-02-24 13:52:42 -06:00
EvilPudding
0417ed63a8
Added arity greater than 2, and test cases.
2016-02-24 17:46:54 +00:00
Lewis Van Winkle
3f1d5d2553
Renamed find functions for clarity.
2016-02-23 17:36:15 -06:00
Lewis Van Winkle
681fb9aa0f
Allow empty parens for function0.
2016-02-23 17:29:03 -06:00
Lewis Van Winkle
d9138d4bff
Added ability for dynamic functions.
2016-02-23 17:13:11 -06:00
Lewis Van Winkle
52a4995d6c
Added comma operator, builtin functions of arity 0 and 2.
2016-02-23 15:18:44 -06:00
EvilPudding
682e9c1b34
Fixed possible segmentation fault.
2016-02-23 15:24:12 +00:00
EvilPudding
60a852a1a3
Optimized find_var
2016-02-23 15:18:39 +00:00
EvilPudding
3e8fc56209
Optimized find_function
2016-02-23 14:59:04 +00:00
Lewis Van Winkle
11b8e0e647
Using fmod function for modulus.
2016-01-26 14:02:19 -06:00
Lewis Van Winkle
8c7839ef23
Fixed case of NaN input to modulus.
2016-01-26 13:37:57 -06:00
Lewis Van Winkle
4e60574efc
Fixed case of X%0 to return NaN.
2016-01-26 13:31:43 -06:00
Lewis Van Winkle
0dcd120d51
Changed variable names.
2016-01-24 21:02:47 -06:00
Lewis Van Winkle
00f8febe43
Fixed te_interp free bug.
2016-01-24 20:33:52 -06:00
Lewis Van Winkle
1ee637afef
Changed error handling a bit. te_interp returns NaN for bad expressions.
2016-01-23 12:09:38 -06:00