Skip to content

wrong result from function TRUNCATE #1368

@oldk1331

Description

@oldk1331

Describe the bug
(multiple-value-bind (quo remv) (TRUNCATE -2641601155853493834 6006) (list quo remv)) returns (-439827032276639 -).

Expected behavior
It should return (-439827032276639 0).

Actual behavior
I found this bug when I was trying to port FriCAS to CLASP. There were a few seemingly random failures, that I traced to this function TRUNCATE. (Basically something like: g := gcd(a,b); a exquo g)

Code at issue

(multiple-value-bind (quo remv) (TRUNCATE -2641601155853493834 6006) (list quo remv))

If the code is more than a few dozen lines, please attach a source file instead.

Context

  • Built from source, cclasp-boehmprecise-1.0.0-529-gc6c8ae3c6-cst
  • OS is Linux, x86_64.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions