From 61e847cdfd8455a7ba67a0038add8dd35b4e0bff Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Fri, 21 Apr 2000 21:28:10 +0000 Subject: [PATCH] - numeric::to_rational(): fixed thinko. --- ginac/normal.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ginac/normal.cpp b/ginac/normal.cpp index 1126d27c..4e814361 100644 --- a/ginac/normal.cpp +++ b/ginac/normal.cpp @@ -2046,7 +2046,8 @@ ex basic::to_rational(lst &repl_lst) const } -/** Implementation of ex::to_rational() for symbols. This returns the unmodified symbol. +/** Implementation of ex::to_rational() for symbols. This returns the + * unmodified symbol. * @see ex::to_rational */ ex symbol::to_rational(lst &repl_lst) const { @@ -2054,14 +2055,14 @@ ex symbol::to_rational(lst &repl_lst) const } -/** Implementation of ex::to_rational() for a numeric. It splits complex numbers - * into re+I*im and replaces I and non-rational real numbers with a temporary - * symbol. +/** Implementation of ex::to_rational() for a numeric. It splits complex + * numbers into re+I*im and replaces I and non-rational real numbers with a + * temporary symbol. * @see ex::to_rational */ ex numeric::to_rational(lst &repl_lst) const { if (is_real()) { - if (!is_integer()) + if (!is_rational()) return replace_with_symbol(*this, repl_lst); } else { // complex numeric re = real(); -- 2.49.0