Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplying and dividing by 3 hangs #30786

Closed
GMS103 opened this issue Oct 17, 2020 · 18 comments
Closed

Multiplying and dividing by 3 hangs #30786

GMS103 opened this issue Oct 17, 2020 · 18 comments

Comments

@GMS103
Copy link
Member

GMS103 commented Oct 17, 2020

Tested with https://sagecell.sagemath.org

sage: version()
'SageMath version 9.1, Release Date: 2020-05-20'

All of these work as expected:

sage: exp(-ln(-x))
sage: exp(-3*ln(-x)/3)
sage: exp(-ln(-9*x))

However this hangs:

sage: exp(-3*ln(-9*x)/3)

In case you are curious, this is what I was doing (the expressions were a bit more complex, of course):

sage: a=var('a')
sage: y=exp(-3*x)
sage: x0=ln(-9*a)/3
sage: y(x=x0)

Depends on #30446

Component: symbolics

Author: Dave Morris

Branch/Commit: 6ee3113

Reviewer: Travis Scrimshaw, Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/30786

@DaveWitteMorris
Copy link
Member

comment:1

I confirm that there is a problem. CoCalc ran out of memory. My laptop (9.2rc2 on MacOS 10.15.7) completed eventually (I think it took about half an hour). The output is a 4GB string of nonsense that seems to be almost entirely digits, but starts with -1/34723950083 and ends with 91987451449/x.

These symptoms are somewhat similar to #30446.

@bmlivin
Copy link
Mannequin

bmlivin mannequin commented Oct 19, 2020

comment:2

DaveWitteMorris is correct. I checked and this is the same issue as #30446. If you look on that ticket, I submitted a pull request with pynac that will fix the issue.

@GMS103
Copy link
Member Author

GMS103 commented Oct 19, 2020

comment:3

Thanks for the feedback, I was really surprised by this bug.
Glad to know it will be fixed.

@DaveWitteMorris
Copy link
Member

comment:4

As pointed out in comment:2, this will be fixed by the patch to pynac in #30446. When that ticket is closed, we can add this as another doctest.

@DaveWitteMorris
Copy link
Member

Dependencies: #30446

@DaveWitteMorris
Copy link
Member

Branch: public/30786

@DaveWitteMorris
Copy link
Member

comment:6

The PR adds doctests for the bugs on this ticket, #28620, and #30304. All were fixed by the patch to pynac at #30446 (which has positive review). These doctests are in the _pow_ method, and I moved the doctest of #30446 to the same place. (It was in the _latex_ method, which does not seem like such a good place.)


New commits:

dc073dffixes for trac #30446
4a5d053doctests for trac 28620, 30304, 30786

@DaveWitteMorris
Copy link
Member

Commit: 4a5d053

@DaveWitteMorris
Copy link
Member

Author: Dave Morris

@tscrim
Copy link
Collaborator

tscrim commented Jan 11, 2021

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Jan 11, 2021

comment:7

LGTM.

@DaveWitteMorris
Copy link
Member

comment:8

Thanks!

@dimpase
Copy link
Member

dimpase commented Jan 24, 2021

comment:9

rebase over new #30446

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2021

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9d747fcsage --package update-latest: Distinguish pypi package name and spkg name
f74f66csage --package update-latest: Accept package classes :standard:, :optional: etc., restrict to normal Python packages
182b3d2sage -package fix-checksum: Handle package classes, ignore non-normal packages
9a57cf6pynac update
563940edoctest from #30446
51def3csane version name
4834dc8remove upstreamed patch
214712dtarball update
6ee3113doctests for trac 28620, 30304, 30786

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2021

Changed commit from 4a5d053 to 6ee3113

@dimpase
Copy link
Member

dimpase commented Jan 24, 2021

Changed reviewer from Travis Scrimshaw to Travis Scrimshaw, Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Jan 24, 2021

comment:11

OK, done

@vbraun
Copy link
Member

vbraun commented Mar 9, 2021

Changed branch from public/30786 to 6ee3113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants