9
$\begingroup$

I often find MixedRadix very useful for make certain kinds of unit conversions. For example,

UnitConvert[Quantity[266752, "Seconds"], MixedRadix["Hours", "Minutes", "Seconds"]]

units

But since V10.2 the front-end doesn't like MixedRadix as an argument to UnitConvert. The kernel, on the other hand, still likes it just fine.

Editor coloring issue

In UnitConvert the code editor flags perfectly correct MixedRadix forms as being in error.

$\qquad $edit

Input template issue

In UnitConvert, the form-completion template is also broken. The template offered by the editor is not a form acceptable to UnitConvert.

$\qquad $template

UnitConvert does not want the arguments to MixedRadix wrapped by List.

Documentation issue

The Documentation Center seems to be completely silent on MixedRadix as an argument for UnitConvert. Searching on MixedRadix only turns up the an article on it use in number theory, proudly flagged as NEW. At least, no search I could devise produced any mention of using MixedRadix with UnitConvert.

Question

What new feature was introduced into Mathematica in V10.2 to so disturb the way the front-end deals with MixedRadix in v10.2 and later?

$\endgroup$

1 Answer 1

9
$\begingroup$

A hint about what is going on is provided by searching on MixedRadix in V10.2 or later. You will find the symbol was overloaded to allow the user to specify a sequence number bases for integers represented in mixed-base form. This has produced the unfortunate consequences that I mentioned in the question.

I brought this to the attention of Wolfram tech support. I think you find their responses interesting. The 1st reply I got said:

After reviewing your notebook, it would appear as though MixedRadix could use some fine tuning, both in its implementation and in its documentation. I thank you for clearly illustrating the issues you mentioned.

I have since filed a report with the appropriate developer so that they may look into the issue.

Then there was a 2nd reply, which said:

After filing a report with the appropriate team, they gave me some feedback on the issues.

We are currently deprecating MixedRadix in Quantity so that it could be used primarily in numeric functions. While it still works, you can consider that as more of a hidden feature to support your previous code as opposed to the intended behavior within the program.

In an upcoming version you can expect new documented functions like MixedMagnitude and MixedUnit to handle mixed quantity objects. The specifics are subject to change, but we are aware of the issues and are putting effort into sorting out the kinks.

In my opinion they should have used the head MixedUnit when they introduced UnitConvert in V9. It's a better name for that purpose and would have saved everybody much grief.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.