Design #1292
Interpreter: fns which accept INT or RAT
Description
There are quite a few functions which accept as arg INT
or RAT
.
The current solution is to call evalArgAsT1orT2<INT,RAT>
;
in fact there are also several which call evalArgAsT1orT2orT3<INT,RAT,RINGELEM>
.
I want to write a function which accepts a list of RAT
but which continues to
work if some or all of the list entries are INT
. The obvious call evalArgAsListOf<RAT>
does not do what I want -- it complains if there is an INT
instead of a RAT
.
It seems to me that INT
should always be allowed where RAT
is expected.
It is less clear to me whether a RAT
with denominator 1 should be accepted where an INT
is expected.
Ideas? Suggestions? Points to dicuss?
History
#1 Updated by John Abbott almost 5 years ago
- Target version changed from CoCoA-5.3.0 to CoCoA-5.4.0
Some cases where it may not be so clear:
den
andnum
SmoothFactor
floor
andceil
(probably several more)
#2 Updated by John Abbott over 2 years ago
- Target version changed from CoCoA-5.4.0 to CoCoA-5.4.2