Changes between Version 1 and Version 2 of Ticket #15786, comment 13


Ignore:
Timestamp:
05/29/15 08:16:38 (4 years ago)
Author:
rws
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15786, comment 13

    v1 v2  
    33Replying to [comment:12 deinst]:
    44>... Although the `Expression` object has an `is_integer` method, it does not seem to have any way of getting that integer other than calling `floor` or `ceil`.
    5 This calls Pynac and performs a call to `ex::info(info_flags::integer)` which is virtual so you have methods named `info()` for all subclasses of `basic`, see http://www.ginac.de/tutorial/#The-class-hierarchy. In fact, only `add`, `mul`, and `numeric` have any handling of that flag, the relevant code is here:
     5`is_integer` calls Pynac and performs a call to `ex::info(info_flags::integer)` which is virtual so you have methods named `info()` for all subclasses of `basic`, see http://www.ginac.de/tutorial/#The-class-hierarchy. In fact, only `add`, `mul`, and `numeric` have any handling of that flag, the relevant code is here:
    66
    77 * https://github.com/pynac/pynac/blob/master/ginac/add.cpp#L263
     
    1616            (x in ZZ))
    1717}}}
    18 So, no, `is_integer` does not call `ceil` or `floor`.