Skip to content

Wrong result of a symbolic computation of a det while importing in python #41118

@Chaman-veteran

Description

@Chaman-veteran

Steps To Reproduce

I have the following (correct) result with sage:

sage: A = matrix([[0.09005406498908997, 0.008119525766232982, 0.0007320790980008322], [0.008119525766232
....: 982, 0.0007320790980008322, 6.600629410631293e-05], [0.0007320790980008322, 6.600629410631293e-05,
....:  SR.var('x')]])
sage: A.det()
(1.35525271560688e-20)*x - 8.10823275152970e-26

However, using python here's the (wrong) result I obtain:

>>> from sage.all import matrix, SR
>>> A = matrix([[0.09005406498908997, 0.008119525766232982, 0.0007320790980008322], [0.00811952576\
6232982, 0.0007320790980008322, 6.600629410631293e-05], [0.0007320790980008322, 6.600629410631293e-05,\
 SR.var('x')]])
>>> A.det()
9.408698445934656e-27

Expected Behavior

Sage and python interpretors should both return the same, correct result

Actual Behavior

While sage does the computation right, python does not

Additional Information

No response

Environment

  • OS: Linux archlinux 6.17.5-arch1-1
  • Sage Version: 10.7
  • Python Version 3.13.7

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions