Cyclic term error with quot_rem
Marc Nieper-Wißkirchen <[email protected]> Wed, 29 Nov 2023 17:21:35 +0100
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <CAEYrNrT4Y28cRfY4B7wF8fQAt7mM-4An7q=ymFdVptHJCjBnMQ@mail.gmail.com> |
--0000000000007876cf060b4ceee7 Content-Type: text/plain; charset="UTF-8" Hi Daniel, Today, I have stumbled upon the following: | ?- X #= quot_rem(3, 2, U). X #= quot_rem(3, 2, U). cannot display cyclic term for U X = 1 yes | ?- I don't understand why U is not unified with 2. Compare with the following, which works: | ?- U #= 3 rem 2. U #= 3 rem 2. U = 1 yes | ?- I tested this with the latest release version (1.5.0) and the version packaged with Ubuntu (1.4.5). Thanks, Marc --0000000000007876cf060b4ceee7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac= e">Hi Daniel,</div><div class=3D"gmail_default" style=3D"font-family:monosp= ace"><br></div><div class=3D"gmail_default" style=3D"font-family:monospace"= >Today, I have stumbled upon the following:</div><div class=3D"gmail_defaul= t" style=3D"font-family:monospace"><br>| ?- X #=3D quot_rem(3, 2, U).<br>X = #=3D quot_rem(3, 2, U).<br><br>cannot display cyclic term for U<br>X =3D 1<= br><br>yes</div><div class=3D"gmail_default" style=3D"font-family:monospace= ">| ?-</div><div class=3D"gmail_default" style=3D"font-family:monospace"><b= r></div><div class=3D"gmail_default" style=3D"font-family:monospace">I don&= #39;t understand why U is not unified with 2.=C2=A0 Compare with the follow= ing, which works:<br></div><div class=3D"gmail_default" style=3D"font-famil= y:monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:mo= nospace">| ?- U #=3D 3 rem 2.<br>U #=3D 3 rem 2.<br><br>U =3D 1<br><br>yes<= br>| ?- <br></div><div class=3D"gmail_default" style=3D"font-family:monospa= ce"><br></div><div class=3D"gmail_default" style=3D"font-family:monospace">= I tested this with the latest release version (1.5.0) and the version packa= ged with Ubuntu (1.4.5).</div><div class=3D"gmail_default" style=3D"font-fa= mily:monospace"><br></div><div class=3D"gmail_default" style=3D"font-family= :monospace">Thanks,</div><div class=3D"gmail_default" style=3D"font-family:= monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:mono= space">Marc<br></div></div> --0000000000007876cf060b4ceee7--