0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

nsimplify「nsimplify(0.122008467928146) による小数の有理数・数式近似表現」をAI先生に教えてもらいました。

0
Last updated at Posted at 2026-09-21

Gemini先生へ

(回答英文省略)

Float( (-1 + sqrt(3))/6)
# Evaluate (-1 + sqrt(3))/6 as a floating-point number in SymPy
from sympy import Float, sqrt

expr = (-1 + sqrt(3)) / 6
result = Float(expr)  # 0.122008467928146
nsimply(0.122008467928146)
import sympy as sp

val = 0.122008467928146

# Default behavior (returns a rational fraction):
sp.nsimplify(val)
# Output: 61004233964073 / 500000000000000

# Providing constants to guide the identification:
sp.nsimplify(val, [sp.sqrt(3)])
# Output: -1/6 + sqrt(3)/6
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?