Opened 9 years ago

Closed 6 years ago

#10062 closed defect (fixed)

With imag, sqrt and subs I get 0==1

Reported by: fmaltey Owned by: burcin
Priority: major Milestone: sage-5.11
Component: calculus Keywords:
Cc: kcrisman Merged in: sage-5.11.beta0
Authors: Burcin Erocal Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by burcin)

I use Sage 4.5.3

var('m') ; y=sqrt(m^2-1)
y(m=0)         # =I, is right
imag(y)        # =.... feels right, arctan2(0,-1)=pi when m=0
imag(y(m=0))   # =1, is right
(imag(y))(m=0) # is 0 and I don't understand why ! 

Apply trac_10062-doctest.sage-5.10.beta5.patch

Attachments (1)

trac_10062-doctest.sage-5.10.beta5.patch (1.1 KB) - added by burcin 6 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by burcin

  • Authors set to Burcin Erocal
  • Milestone set to sage-4.6.1
  • Status changed from new to needs_review

This was caused by the problem reported at #10064. The arctan2() automatic evaluation function checks if the second argument is positive, line 1062 of inifcns_trans.cpp in pynac:

		// atan2(0, x), x real and positive -> 0
		if (x.info(info_flags::positive))
			return _ex0;

attachment:trac_10062-doctest.patch adds a doctest to check this.

comment:2 Changed 9 years ago by ohanar

Did you mean to check if #10064 was fixed?

comment:3 Changed 9 years ago by was

I think putting 10062 in the patch is ok.

comment:4 Changed 9 years ago by kcrisman

  • Cc kcrisman added

comment:5 Changed 9 years ago by kcrisman

  • Status changed from needs_review to needs_info

Putting as 'needs info' until #10064 is resolved.

Changed 6 years ago by burcin

comment:6 Changed 6 years ago by burcin

  • Description modified (diff)
  • Milestone changed from sage-5.10 to sage-5.11
  • Status changed from needs_info to needs_review

The underlying problem #7160 was finally fixed (by #13213). Please review this simple doctest patch.

comment:7 Changed 6 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Looks good to me.

comment:8 Changed 6 years ago by jdemeyer

  • Merged in set to sage-5.11.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.