| Age | Commit message (Collapse) | Author |
|
bottom-to-top
Values() returns slices.Clone(s.values) which preserves push order
(bottom at index 0, top at last index). The existing comment
contradicted both the implementation and the test documentation.
|
|
Use slices.Clone() instead of the three-line make/copy idiom. This
is more concise and correctly handles nil slices.
|
|
Per Go best practices, each file should focus on a single concern:
- Created stack.go (62 lines): Stack type and methods
- Moved Value type to number.go alongside Float/Rat/StringNum/Symbol
- variables.go (425→296 lines): now contains only Variables, VariableInfo,
four interfaces, and error variables
|
|
This struct provided stack manipulation operator implementations but was
never used in the codebase. All stack operations are implemented directly
in the Operations struct in operations.go.
|
|
- Fixed Ln operation to handle Value conversion before math.Log using Float64() which handles boolean conversion (true → 1, false → 0)
- Added TestLnWithBoolean and TestLnEdgeCases tests for comprehensive coverage
- Refactored operations.go into separate files (arithmetic.go, boolean_ops.go, hyper.go, stack.go, variable.go)
- Removed unused toNumber function from number.go
- Added Float64() method to Value struct for boolean conversion
|