bug? in constant_coerce

3 views
Skip to first unread message

Qian Yun

unread,
5:40 AM (11 hours ago) 5:40 AM
to fricas-devel
constant_coerce([x, m, e], m') ==
m' = $SingleInteger =>
if x = ["0"] then x = 0
if x = ["1"] then x = 1
not(INTEGERP(x)) => nil
-- Check if in range of FIXNUM on all supported implementations
x > 8000000 or x < -8000000 => nil
m = $Integer or m = $PositiveInteger or m = $NonNegativeInteger =>
[x, m', e]
nil



The "x = 0" and "x = 1" is compare, not assignment.

Looks like a bug to me. But I lack the expertise to construct
an example to verify this.

- Qian

Reply all
Reply to author
Forward
0 new messages