#25661 closed defect (fixed)
Primecount failures on 32-bit systems
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | sage-8.3 |
Component: | packages: optional | Keywords: | thursdaysbdx, sdl |
Cc: | vdelecroix | Merged in: | |
Authors: | Vincent Klein | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | ad4059c (Commits, GitHub, GitLab) | Commit: | ad4059c2ed07a25f5a338e0dc005d061f6eb7037 |
Dependencies: | Stopgaps: |
Description
There are various failures of the form
sage -t --long src/sage/interfaces/primecount.pyx ********************************************************************** File "src/sage/interfaces/primecount.pyx", line 47, in sage.interfaces.primecount.prime_pi Failed example: prime_pi(1000) # optional - primecount Expected: 168 Got: 168L **********************************************************************
if int64_t
is larger than a long
.
Change History (14)
comment:1 Changed 4 years ago by
- Owner changed from (none) to vklein
comment:2 Changed 4 years ago by
- Branch set to u/vklein/primecount_failures_on_32_bit_systems
comment:3 Changed 4 years ago by
- Commit set to ad4059c2ed07a25f5a338e0dc005d061f6eb7037
comment:4 Changed 4 years ago by
- Keywords thursdaysbdx added
- Status changed from new to needs_review
Failing tests fixed.
comment:5 Changed 4 years ago by
- Owner changed from vklein to (none)
comment:6 Changed 4 years ago by
- Reviewers set to Frédéric Chapoton
- Status changed from needs_review to positive_review
ok, this will do the job, if not elegantly
comment:7 follow-ups: ↓ 8 ↓ 9 Changed 4 years ago by
Why not using # 64-bit
and # 32-bit
keywords as done elsewhere (e.g. when testing hash methods) ?
comment:8 in reply to: ↑ 7 Changed 4 years ago by
- Status changed from positive_review to needs_work
Replying to tmonteil:
Why not using
# 64-bit
and# 32-bit
keywords as done elsewhere (e.g. when testing hash methods) ?
Because i didn't remember/know these flags. Thanks.
comment:9 in reply to: ↑ 7 Changed 4 years ago by
Replying to tmonteil:
Why not using
# 64-bit
and# 32-bit
keywords as done elsewhere (e.g. when testing hash methods) ?
To make the tests pass on both Python2 and Python3?
comment:10 Changed 4 years ago by
- Status changed from needs_work to positive_review
True !
Something like 168L # 32-bit
will fail with python3.
comment:11 follow-up: ↓ 12 Changed 4 years ago by
Is the plan to turn every explicit doctest into an indirect one, just to have them pass simultaneously on python2 and python 3 ?
comment:12 in reply to: ↑ 11 Changed 4 years ago by
Replying to tmonteil:
Is the plan to turn every explicit doctest into an indirect one, just to have them pass simultaneously on python2 and python 3 ?
I hope not. But
- testing equality of integers is a better test than checking string representation
- I think that output flag should be avoided as much as possible
comment:13 Changed 4 years ago by
- Branch changed from u/vklein/primecount_failures_on_32_bit_systems to ad4059c2ed07a25f5a338e0dc005d061f6eb7037
- Resolution set to fixed
- Status changed from positive_review to closed
comment:14 Changed 3 years ago by
- Keywords sdl added
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
Trac #25661: Fix doctests for 32bits platform