Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7934851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:45:01+00:00 2026-06-03T21:45:01+00:00

I am trying to define a constant in SymPy with the same functionality as

  • 0

I am trying to define a constant in SymPy with the same functionality as constants like pi, e, and i. When exact answers are given, they remain as their symbols, instead of evaluating to their values. For instance if I ran

2*pi

it would return 2⋅π. If I wanted an approximate answer, I could run

N(2*pi)

which returns 6.28318530717959.

What I want is to define a constant, tau, where

tau

returns τ, while

N(tau)

returns 6.28318530717959.

Basically I’m just trying to define a new symbol, τ, which is equal to 2⋅π.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:45:02+00:00Added an answer on June 3, 2026 at 9:45 pm

    You need to subclass NumberSymbol in the same way that Pi does it. Just copy-pasting the source code for Pi and adding *2 should be enough. Be aware that these objects are singleton classes and not instances.

    You should also read the pi manifesto 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to define a select tag in my view. My view looks like
Im trying to define an array of arrays as a Constant in one of
What I trying to do is to define a constant variable in a config
I'm new to Objective C. I am trying to define Constants which have behavior
I'm trying to define a constant, but I don't want to redefine it if
I have a bunch of constants declared like this: #define kConstant0 @Cow #define kConstant1
i'm trying to define a constant in Delphi: const FNV_offset_basis = 14695981039346656037; And i
I'm trying to define the timespan between shots during constant fire, but got weird
I'm trying to define a delegate function that will return an IEnumerable. I'm having
I'm trying to define a new shortcode in WordPress, and I get the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.