Opened 15 years ago

Closed 15 years ago

#239 closed defect (fixed)

x^(3/4) powering/coercion issue

Reported by: was Owned by: somebody
Priority: minor Milestone:
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by was)

> Can someone please add support for evaluating say 2^(3/4) or 7^(5/3).
>  
> > 
>  
 
About this I just found this bug:
 
sage: x=maxima('x')
 
sage: x^(3/4)
 x^3/4
 
sage: x=maxima('2')
 
sage: x^150
 1427247692705959881058285969449495136382746624
 
sage: x^(3/4)
 2
 
sage: maxima(3/4)
 3/4
 
Greg

Greg's problem is that the exponent is rounded maybe, since x^(3/4) should be the same as x^(maxima('3/4')).

Change History (4)

comment:1 Changed 15 years ago by was

  • Summary changed from x^(3/4) rounding issue to x^(3/4) powering/coercion issue

comment:2 Changed 15 years ago by was

  • Description modified (diff)

comment:3 Changed 15 years ago by was

Is this the same bug?  The types involved seem very diverse, but the strange 
result appears remarkably similar.
 
sage: CF=CyclotomicField(3)
sage: two=CF(2)
sage: two^(1/3)
1
sage: me=two^(1/3)
sage: me.parent()
Cyclotomic Field of order 3 and degree 2
 
--

comment:4 Changed 15 years ago by was

  • Resolution set to fixed
  • Status changed from new to closed

This is now fixed for sage 2.1. The fix involved making pow more careful (to raise an error in many cases).

Note: See TracTickets for help on using tickets.