Skip to content

Commit

Permalink
Fix rational printing.
Browse files Browse the repository at this point in the history
  • Loading branch information
corywalker committed Sep 8, 2017
1 parent def7590 commit 2769842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion expreduce/ex_rational.go
Expand Up @@ -54,7 +54,7 @@ func (this *Rational) Eval(es *EvalState) Ex {
}

func (this *Rational) StringForm(form string, context *String, contextPath *Expression) string {
return fmt.Sprintf("%d/%d", this.Num, this.Den)
return fmt.Sprintf("(%d/%d)", this.Num, this.Den)
}

func (this *Rational) String() string {
Expand Down

0 comments on commit 2769842

Please sign in to comment.