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

Minor test failure on Cygwin in ComplexDoubleElement._pow_ #27461

Closed
embray opened this issue Mar 11, 2019 · 8 comments
Closed

Minor test failure on Cygwin in ComplexDoubleElement._pow_ #27461

embray opened this issue Mar 11, 2019 · 8 comments

Comments

@embray
Copy link
Contributor

embray commented Mar 11, 2019

Since #27222 I get the following tiny failure on Cygwin:

sage -t --long src/sage/rings/complex_double.pyx
**********************************************************************
File "src/sage/rings/complex_double.pyx", line 1642, in sage.rings.complex_double.ComplexDoubleElement._pow_
Failed example:
    (-2) ^ CDF(-0.5)
Expected:
    4.329780281177467e-17 - 0.7071067811865476*I
Got:
    4.329780281177466e-17 - 0.7071067811865475*I
**********************************************************************
1 item had failures:
   1 of  19 in sage.rings.complex_double.ComplexDoubleElement._pow_
    [331 tests, 1 failure, 2.42 s]

That is, it's just off in the representation of the last decimal place. I wish I could explain exactly where the difference comes from, but I think for this test it should suffice to just add a tolerance flag.

CC: @jdemeyer

Component: porting: Cygwin

Author: Erik Bray

Branch/Commit: 5a0f13d

Reviewer: Volker Braun

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

@embray embray added this to the sage-8.7 milestone Mar 11, 2019
@jdemeyer
Copy link

Replying to @embray:

I wish I could explain exactly where the difference comes from

CDF uses the system math library, which is known to be implementation-dependent (e.g. for the same number x the value of log(x) may be different on different systems).

@embray
Copy link
Contributor Author

embray commented Mar 11, 2019

comment:2

Yes, that's what I figured. I know for a fact the log() function in particular in newlib math has caused minor numerical differences before.

It's nice to know for sure that that's probably the case.

@embray
Copy link
Contributor Author

embray commented Mar 14, 2019

Author: Erik Bray

@embray
Copy link
Contributor Author

embray commented Mar 14, 2019

comment:3

Trivial, but still needed for tests to pass.


New commits:

5a0f13dTrac #27461: Add abs tol on this test to account for minor numerical

@embray
Copy link
Contributor Author

embray commented Mar 14, 2019

Commit: 5a0f13d

@embray
Copy link
Contributor Author

embray commented Mar 14, 2019

Branch: u/embray/ticket-27461

@vbraun
Copy link
Member

vbraun commented Mar 14, 2019

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Mar 15, 2019

Changed branch from u/embray/ticket-27461 to 5a0f13d

@vbraun vbraun closed this as completed in b1a58d9 Mar 15, 2019
dkrenn added a commit to dkrenn/sage that referenced this issue May 25, 2023
…regular-guess

* u/dkrenn/sequences/rec-hash: (8211 commits)
  Updated SageMath version to 8.7
  Updated SageMath version to 8.7.rc0
  Trac sagemath#27490: Moved the alternate build_many implementation into a sage_setup.docbuild.utils module.
  Trac sagemath#27490: Further fixes in use of os.wait()
  Trac sagemath#27214: Patch GAP to allocate its memory pool using MAP_NORESERVE on Cygwin
  Trac sagemath#27490: Address some review comments and other cleanup:
  A little bit of import cleanup
  Trac sagemath#27490: Simplistic multiprocessing.Pool replacement for parallel docbuild on older Cygwin
  Fix alarm() test when cysignals was compiled with debugging
  Trac sagemath#27485: Use sdh_cmake in the spkg-install for primecount.
  Trac sagemath#27484: Add shd_cmake helper for running cmake with the correct flags for building Sage SPKGs.
  cysignals should be a normal dependency
  Upgrade to Cysignals 1.10.2
  Upgrade to notebook-5.7.6
  Trac sagemath#27461: Add abs tol on this test to account for minor numerical difference on Cygwin due to libm differences.
  Replacing None < infinity comparison with equivalent code.
  Some last little tidbits for uniformity.
  Removing some code duplication for __pth_root (changed to _pth_root_func).
  One more xderinv added.
  trac 27474: move some references to the master bibliography file.
  ...
dkrenn added a commit to dkrenn/sage that referenced this issue Jul 4, 2023
…ular-warning

* u/dkrenn/sequences/k-regular-guess: (8211 commits)
  Updated SageMath version to 8.7
  Updated SageMath version to 8.7.rc0
  Trac sagemath#27490: Moved the alternate build_many implementation into a sage_setup.docbuild.utils module.
  Trac sagemath#27490: Further fixes in use of os.wait()
  Trac sagemath#27214: Patch GAP to allocate its memory pool using MAP_NORESERVE on Cygwin
  Trac sagemath#27490: Address some review comments and other cleanup:
  A little bit of import cleanup
  Trac sagemath#27490: Simplistic multiprocessing.Pool replacement for parallel docbuild on older Cygwin
  Fix alarm() test when cysignals was compiled with debugging
  Trac sagemath#27485: Use sdh_cmake in the spkg-install for primecount.
  Trac sagemath#27484: Add shd_cmake helper for running cmake with the correct flags for building Sage SPKGs.
  cysignals should be a normal dependency
  Upgrade to Cysignals 1.10.2
  Upgrade to notebook-5.7.6
  Trac sagemath#27461: Add abs tol on this test to account for minor numerical difference on Cygwin due to libm differences.
  Replacing None < infinity comparison with equivalent code.
  Some last little tidbits for uniformity.
  Removing some code duplication for __pth_root (changed to _pth_root_func).
  One more xderinv added.
  trac 27474: move some references to the master bibliography file.
  ...
dkrenn added a commit to dkrenn/sage that referenced this issue Jul 4, 2023
SageMath version 8.7, Release Date: 2019-03-23

* tag '8.7': (943 commits)
  Updated SageMath version to 8.7
  Updated SageMath version to 8.7.rc0
  Trac sagemath#27490: Moved the alternate build_many implementation into a sage_setup.docbuild.utils module.
  Trac sagemath#27490: Further fixes in use of os.wait()
  Trac sagemath#27214: Patch GAP to allocate its memory pool using MAP_NORESERVE on Cygwin
  Trac sagemath#27490: Address some review comments and other cleanup:
  A little bit of import cleanup
  Trac sagemath#27490: Simplistic multiprocessing.Pool replacement for parallel docbuild on older Cygwin
  Fix alarm() test when cysignals was compiled with debugging
  Trac sagemath#27485: Use sdh_cmake in the spkg-install for primecount.
  Trac sagemath#27484: Add shd_cmake helper for running cmake with the correct flags for building Sage SPKGs.
  cysignals should be a normal dependency
  Upgrade to Cysignals 1.10.2
  Upgrade to notebook-5.7.6
  Trac sagemath#27461: Add abs tol on this test to account for minor numerical difference on Cygwin due to libm differences.
  Replacing None < infinity comparison with equivalent code.
  Some last little tidbits for uniformity.
  Removing some code duplication for __pth_root (changed to _pth_root_func).
  One more xderinv added.
  trac 27474: move some references to the master bibliography file.
  ...
dkrenn added a commit to dkrenn/sage that referenced this issue Aug 3, 2023
…ounded

* u/dkrenn/k-regular-warning: (8211 commits)
  Updated SageMath version to 8.7
  Updated SageMath version to 8.7.rc0
  Trac sagemath#27490: Moved the alternate build_many implementation into a sage_setup.docbuild.utils module.
  Trac sagemath#27490: Further fixes in use of os.wait()
  Trac sagemath#27214: Patch GAP to allocate its memory pool using MAP_NORESERVE on Cygwin
  Trac sagemath#27490: Address some review comments and other cleanup:
  A little bit of import cleanup
  Trac sagemath#27490: Simplistic multiprocessing.Pool replacement for parallel docbuild on older Cygwin
  Fix alarm() test when cysignals was compiled with debugging
  Trac sagemath#27485: Use sdh_cmake in the spkg-install for primecount.
  Trac sagemath#27484: Add shd_cmake helper for running cmake with the correct flags for building Sage SPKGs.
  cysignals should be a normal dependency
  Upgrade to Cysignals 1.10.2
  Upgrade to notebook-5.7.6
  Trac sagemath#27461: Add abs tol on this test to account for minor numerical difference on Cygwin due to libm differences.
  Replacing None < infinity comparison with equivalent code.
  Some last little tidbits for uniformity.
  Removing some code duplication for __pth_root (changed to _pth_root_func).
  One more xderinv added.
  trac 27474: move some references to the master bibliography file.
  ...
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

3 participants