Skip to content

Commit

Permalink
Fix some lingering issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
corywalker committed Jul 21, 2017
1 parent f0a70fd commit 870355b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/calc.go
Expand Up @@ -83,12 +83,12 @@ func main() {
"Out[%d]//%s= %s\n\n",
promptNum,
specialForm,
asSpecialForm.Parts[1].StringForm(specialForm, context, contextPath),
asSpecialForm.Parts[1].StringForm(specialForm[7:], context, contextPath),
)
wasSpecialForm = true
}
if !wasSpecialForm {
fmt.Printf("Out[%d]= %s\n\n", promptNum, res.StringForm("System`InputForm", context, contextPath))
fmt.Printf("Out[%d]= %s\n\n", promptNum, res.StringForm("InputForm", context, contextPath))
}
}

Expand Down
3 changes: 2 additions & 1 deletion expreduce/ex_rational.go
Expand Up @@ -86,7 +86,8 @@ func (this *Rational) DeepCopy() Ex {
}

func (this *Rational) AsBigRat() *big.Rat {
return big.NewRat(this.Num.Int64(), this.Den.Int64())
res := big.NewRat(1, 1)
return res.SetFrac(this.Num, this.Den)
}

func (this *Rational) NeedsEval() bool {
Expand Down

0 comments on commit 870355b

Please sign in to comment.