# How to Unprotect and Clear the E constant?

By default, E is used to represent the Euler's number in Mathematica. I need the variable E to behave just like other undefined variables in my code. When I run the commands

Unprotect[E]
Clear[E]


the variable E remains black, which means it still holds a value. Next, If I run

1.0E


Mathematica gives

2.71828


How can I completely clear this predefined value?

• Your example's result is governed by numeric evaluation, the N function. You can define (after Unprotecting E), e.g. N[E] = 0, and that would change the result in your example. As a result, E will acquire so-called NValues: NValues[E] will not be empty list. But I'd think twice before doing such hard redefinitions for such a fundamental constant as E, it can have all kinds of unobvious consequences for your Mathematica session / calculations. – Leonid Shifrin May 8 at 20:35
• There are a number of alternative "E"s that you can redefine. E.g. [ScriptCapitalE], [DoubleStruckCapitalE], [CapitalEpsilon] – mikado May 8 at 20:38
• I don't think it makes sense to encourage beginners to unprotect fundamental constants. Let's make Pi equal to 3 -- it would make geometry much easier! – bill s May 8 at 21:26
• @BillS Can we make E into 2 3/4? It takes around two hours and forty five minutes to cut down a modest-sized tree, so this qualifies as a natural logger rhythm. – Daniel Lichtblau May 8 at 21:43
• There are far safer ways to do this than to redefine (or undefine) E. Check ref/format/CSV in the documentation (Help > Wolfram Documentation, then enter "CSV"). With "Numeric"->False (or Automatic, I think) you get strings rather than numbers. StringReplace can then change occurrences of the character E into something else. – Daniel Lichtblau May 9 at 17:43

Unprotect[E]
Remove[E]

E = .5
(*0.5*)

1.0 E
(*0.5*)


On the other hand after removing E

EsceeEsc//N

(*2.71828*)


This works, but it is a very bad idea.

The easiest way to get E back to the proper value is to Quit.