First time here? Check out the FAQ!

Ask Your Question
0

Defining custom global constants

asked 12 years ago

daniel.e2718 gravatar image

updated 12 years ago

niles gravatar image

Is it possible to define a custom constant like pi? One that is handled symbolically, one that can be used without prior definition...

For example, could it be possible to define "tau" to equal 2*pi for my Sage installation so that when I open my notebook, I can call "tau" without needing to define it in every cell?

And to take it a step further, would it be possible to replace constants? Like pi with tau/2? This isn't as important, but it would be very nice!

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 12 years ago

niles gravatar image

Just define the variables, functions, or other things in a file, and load it into Sage at startup. There are a number of questions and answers along these lines already on this site:

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 601 times

Last updated: May 18 '12