I am trying to do the following:
theMin = BaseForm[16^^1000,10]
theMax = BaseForm[16^^10000,10]
However this results in an error because Head[theMin] is BaseForm. How can I convert "theMin" and "theMax" from the "display BaseForm" formats into an integer format that can be used for computation?
What I want to get is the following
Bruce, thanks that is great - I did not know you could do the assignment inside the Form function. It would be nice if Mathematica added a parameter/property to the built-in Head function that allowed the user to specify the desired format for a variable and then the return value of the Head function could be a list of recommended options (or function paths) to get to that result. I know that sounds like a complicated (and crazy) request but it would be a slick option.
@John, thanks for providing the alternative unwrap method as well.
What are you really trying to do, anyway? Why use BaseForm to display base 10, when base 10 is the default?
Unwrap before numericizing:
In:= 20*Log10[theMax/theMin] /. BaseForm[x_, _] -> x // N
This question comes up with TableForm and MatrixForm a lot. The solution is to do the assignment inside the *Form function.
In:= BaseForm[theMin = 16^^1000, 10]
Usually, the content of the *Form wrapper can be extracted with First.
In:= aMin = BaseForm[16^^1000, 10]
Actually this worked........
theMin2 = FromDigits["1000",16]
theMax2 = FromDigits["10000",16]
It would be nice if it were possible to wrap a built-in function around BaseForm to be able to reuse the BaseForm variables in other calculations