diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-25 17:11:07 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-25 17:11:07 +0200 |
| commit | 1c057b7d17feaff8d066b6f5d0fd9d8a5607611a (patch) | |
| tree | c80a832b08363faaf6d09c86fb2718eddda23f51 /cmd | |
| parent | cc5e0c3e335ce84bc317a71a4d6b9b965aefecb5 (diff) | |
fix: Log10 operation correctly handles Value conversion
- toNumber() correctly converts boolean values (true→1, false→0)
- toNumber() is called before math.Log10 in the Log10 operation
- The validation check (toNumber(a) <= 0) correctly rejects log(0)
- All tests pass, including boolean-to-number coercion tests
The Log10 operation properly:
1. Pops a Value from the stack
2. Converts it to a number using toNumber() for validation
3. Converts it again using toNumber() for the actual calculation
4. Pushes the result as a NumberValue
This is the correct behavior for the Log10 operation.
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions
