Opened 10 years ago

Closed 7 years ago

#8895 closed defect (worksforme)

symbolic unit conversion function should ignore non-unit symbolic variables

Reported by: was Owned by: burcin
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords:
Cc: jdemeyer Merged in:
Authors: Reviewers: Eviatar Bach, Burcin Erocal
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

This seems wrong to me:

sage: (x * units.length.meter).convert(units.length.mile)
Traceback (most recent call last):
...
ValueError: Incompatible units
sage: (10 * units.length.meter).convert(units.length.mile)
625/100584*mile

Change History (5)

comment:1 Changed 8 years ago by eviatarbach

Ticket #11592 fixes this.

comment:2 Changed 8 years ago by burcin

  • Cc jdemeyer added
  • Component changed from calculus to symbolics
  • Milestone changed from sage-4.7.1 to sage-duplicate/invalid/wontfix
  • Reviewers set to Eviatar Bach, Burcin Erocal

This should be closed as a duplicate of #11592. The patch attached to that ticket fixes this and contains doctests covering William's example from the description.

comment:3 Changed 7 years ago by tscrim

  • Status changed from new to needs_review

comment:4 Changed 7 years ago by tscrim

  • Status changed from needs_review to positive_review

Still fixed in 5.7:

sage: (x*units.length.meter).convert(units.length.mile)
(125/201168*x)*mile
sage: (10*units.length.meter).convert(units.length.mile)
625/100584*mile

comment:5 Changed 7 years ago by jdemeyer

  • Resolution set to worksforme
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.