giac-1.5.0-65+

20 views
Skip to first unread message

François Bissey

unread,
Oct 16, 2019, 8:22:46 PM10/16/19
to sage-pa...@googlegroups.com
Hi all,

I have updated giac in sage-on-gentoo and it gave rise to a couple of
problems.
In 1.5.0-63 onwards we have
sage -t --long usr/lib64/python3.6/site-packages/sage/interfaces/giac.py
**********************************************************************
File "usr/lib64/python3.6/site-packages/sage/interfaces/giac.py", line
993, in sage.interfaces.giac.GiacElement._latex_
Failed example:
print(latex(giac('(x^4 - y)/(y^2-3*x)')))
Expected:
"\frac{x^{4}-y}{y^{2}-3\,x}"
Got:
"\frac{(x^{4}-y)}{(y^{2}-3\cdot x)}"

which is just cleaner latex output and easily patched.

But from 1.5.0-65+ we get
sage -t --long usr/lib64/python3.6/site-packages/sage/interfaces/giac.py
**********************************************************************
File "usr/lib64/python3.6/site-packages/sage/interfaces/giac.py", line
45, in sage.interfaces.giac
Failed example:
x,y=giac('x,y'); giac.int(y/(cos(2*x)+cos(x)),x) # random
Exception raised:
Traceback (most recent call last):
File
"/storage/strogdon/gentoo-rap/usr/lib64/python3.6/site-packages/sage/doctest/forker.py",
line 681, in _run
self.compile_and_execute(example, compiler, test.globs)
File
"/storage/strogdon/gentoo-rap/usr/lib64/python3.6/site-packages/sage/doctest/forker.py",
line 1123, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.interfaces.giac[7]>", line 1, in <module>
x,y=giac('x,y'); giac.int(y/(cos(Integer(2)*x)+cos(x)),x) #
random
ValueError: not enough values to unpack (expected 2, got 1)
**********************************************************************

And more precisely
sage: x,y=giac('x,y')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-9-1f963142d64c> in <module>()
----> 1 x,y=giac('x,y')

ValueError: not enough values to unpack (expected 2, got 1)

Funnily enough
sage: x,y,z=giac('x,y,z')
sage: x=giac('x')
without troubles. It is just when you have two variables.

Any ideas? What kind of bug in giac could that be?

Francois

Vincent Delecroix

unread,
Oct 17, 2019, 12:39:56 AM10/17/19
to sage-pa...@googlegroups.com
What is actually the output of the command

giac('x,y')

?

Vincent Delecroix

unread,
Oct 17, 2019, 12:45:04 AM10/17/19
to sage-pa...@googlegroups.com
In vanilla Sage

sage: g = giac('x,y')
sage: g
x,y
sage: type(g)
<class 'sage.interfaces.giac.GiacElement'>
sage: g[0]
x
sage: g[1]
y

Antonio Rojas

unread,
Oct 17, 2019, 2:22:09 AM10/17/19
to sage-packaging
This is a bug in giac:

$giac
...
Press CTRL and D simultaneously to finish session
Type ?commandname for help
0>> len(x)
1
// Time 0
1>> len(x,y)
1
// Time 0
2>> len(x,y,z)
3
// Time 0

I requested a forum account two weeks ago in order to report it, still waiting...

Dima Pasechnik

unread,
Oct 17, 2019, 3:18:40 AM10/17/19
to sage-packaging
I can report this, if it helps.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-packaging" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-packagin...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-packaging/70938cb9-04ef-4830-976d-477f7f06f334%40googlegroups.com.

François Bissey

unread,
Oct 17, 2019, 3:24:57 AM10/17/19
to sage-pa...@googlegroups.com


> On 17/10/2019, at 8:18 PM, Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Thu, Oct 17, 2019 at 7:22 AM Antonio Rojas <nqn...@gmail.com> wrote:
>>
>> This is a bug in giac:
>>
>> $giac
>> ...
>> Press CTRL and D simultaneously to finish session
>> Type ?commandname for help
>> 0>> len(x)
>> 1
>> // Time 0
>> 1>> len(x,y)
>> 1
>> // Time 0
>> 2>> len(x,y,z)
>> 3
>> // Time 0
>>
>> I requested a forum account two weeks ago in order to report it, still waiting...
>
> I can report this, if it helps.

It would!

François

Dima Pasechnik

unread,
Oct 17, 2019, 3:34:05 AM10/17/19
to sage-packaging
it is now
https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=3&t=2411
> --
> You received this message because you are subscribed to the Google Groups "sage-packaging" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-packagin...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-packaging/73759BD8-6618-431F-9631-16C9D18D4155%40gmail.com.

François Bissey

unread,
Oct 24, 2019, 4:05:27 PM10/24/19
to sage-packaging
1.5.0.69 is out and it fixes it for me.

François
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-packaging/CAAWYfq0Ak2o9PvWGzy0%2B9a-WmXMqRNRn8E1bUNN%3Dcxv524X-0w%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages