Compare commits
2 Commits
31701d2fcd
...
2c2fd8f3f9
Author | SHA1 | Date |
---|---|---|
Sasha Koshka | 2c2fd8f3f9 | |
Sasha Koshka | 2da9943ea3 |
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
|||
module git.tebibyte.media/sashakoshka/mathpan
|
||||
|
||||
go 1.19
|
||||
go 1.18
|
||||
|
||||
require git.tebibyte.media/sashakoshka/stone v0.0.0-20221122052135-ae514f5ae2db
|
||||
|
||||
|
|
7
tree.go
7
tree.go
|
@ -418,7 +418,7 @@ func (operation *Operation) Solution () (solution int64, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (operation *Operation) InexactSolution (solution float64, err error) {
|
||||
func (operation *Operation) InexactSolution () (solution float64, err error) {
|
||||
var intSolution int64
|
||||
intSolution, err = operation.Solution()
|
||||
solution = float64(intSolution)
|
||||
|
@ -529,3 +529,8 @@ func (literal *IntegerLiteral) Solution () (solution int64, err error) {
|
|||
solution = literal.value
|
||||
return
|
||||
}
|
||||
|
||||
func (literal *IntegerLiteral) InexactSolution () (solution float64, err error) {
|
||||
solution = float64(literal.value)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue