Archive for the ‘mathcad’ Category

February 6th, 2012

My attention was recently drawn to a Google+ post by JerWei Zhang where he evaluates 2^3^4 in various packages and notes that they don’t always agree.  For example, in MATLAB 2010a we have 2^3^4 = 4096 which is equivalent to putting (2^3)^4 whereas Mathematica 8 gives 2^3^4 = 2417851639229258349412352 which is the same as putting 2^(3^4).  JerWei’s post gives many more examples including Excel, Python and Google and the result is always one of these two (although to varying degrees of precision).

What surprised me was the fact that they disagreed at all since I thought that the operator precendence rules were an agreed standard across all software packages.  In this case I’d always use brackets since _I_ am not sure what the correct interpretation of 2^3^4 should be but I would have taken it for granted that there is a standard somewhere and that all of the big hitters in the numerical world would adhere to it.

Looks like I was wrong!

May 6th, 2011

Updated January 4th 2011

It is becoming increasingly common for programmers to make use of GPUs (Graphical Processing Units) to speed up their programs substantially.  There are three major low-level programming libraries that allow you to do this in languages such as C; namely CUDA, OpenCL and Microsoft DirectCompute.  Of these three, CUDA is the most developed but it only works on Nvidia graphics cards.

I am often asked if the major commercial math packages support GPU computing and I find myself writing the same summary email over and over again.  So, here is a very brief breakdown of what is currently on offer.  I plan to expand the information contained in this page over time so if you have any information about GPU computing in these packages then let me know.


Core MATLAB contains no support for GPU computing but several organizations (including The Mathworks themselves) have produced add-on toolboxes that add such support:

  • Jacket – This is a product from a company called AccelerEyes and is possibly the most advanced and well developed GPU solution for MATLAB currently available.  As of version 2.0 it supports both OpenCL and CUDA frameworks.
  • The Mathworks’ Parallel Computing Toolbox (PCT) – If you want to do your MATLAB GPU computing the officially supported way then this is the product you need.  As a bonus, it also allows you to make better use of the multicore processor that almost certainly resides in your machine.  Like many of the offerings on this page, only the CUDA framework is supported so you are out of luck if you don’t have an NVidia graphics card.  Even if you do have an NVidia graphics card then you still might be out of luck since the PCT only supports cards that have compute level 1.3 or above (i.e. double precision only).
  • CULA is a set of GPU-accelerated linear algebra libraries utilizing the NVIDIA CUDA parallel computing architecture and it has a MATLAB interface.
  • GPUmat – This product is completely free but is less developed than the commercial offerings above.  Again. it is CUDA only
  • OpenCL toolbox – The only OpenCL solution for MATLAB I could find.  It is free but development seems to have stalled.


Mathematica 8 has support for both CUDA and OpenCL built in so no need for any add-ons.  Furthermore, it supports both single and double precision GPUs so you can experiment with GPU computing on older, cheaper cards.


Maple has had some CUDA-only GPU support since version 14.  On the face of it, the CUDA package only appears to contain one accelerated function–Matrix-Matrix multiplication– but when you load this function it accelerates many functions that use matrix-matrix multiply internally.  I’ve never found a definitive list of such functions though.


Mathcad 15 and Mathcad Prime have no support for GPU enhanced computing.

January 13th, 2011

A man I have a lot of time for is Joel Spolsky, author, software developer and previously a program manager for Microsoft Excel.  Way back in the year 2000 he wrote an article called Things You Should Never Do, Part 1 where his main point was “The single worst strategic mistake that any software company can make is to rewrite your code from scratch.”  He exemplified this principle using products such as Quattro Pro and Netscape 6.0.

Not everyone agrees with Joel’s thesis and it seems that the managers at PTC, the owners of Mathcad, are among them.  The last major update of Mathcad was version 14.0 which was released back in 2007 (the recent Mathcad 15.0 was a relatively minor update despite the .0 version number).  To  some outsiders it appeared that PTC were doing very little with the product until it transpired that what they were actually doing was an almost complete rewrite from the ground up.

That rewrite has now been released in the form of Mathcad Prime 1.0.  I don’t have my hands on a copy yet so I have been scouring the web to try and determine exactly what this new version does right and what it does wrong.  Here’s what I’ve found so far.

  • Mathcad Prime 1.0 does not have everything that Mathcad 15 has.  Jackov Kucan, Director of development at PTC, has publicly stated that it won’t be until Prime 3.0 that users will be able to retire Mathcad 15 and migrate to Prime.
  • Relating to the above point,there is a thread over at the PTC Forums where several users are calling Mathcad Prime a big step backwards. Not everyone agrees though.
  • Another useful discussion thread is one started by PTC where they ask What new features do you want to see in Mathcad Prime?
  • According to one of the discussion threads above, Mathcad Prime doesn’t include several pieces of functionality (symbolics, 3d graphs and animation) that are considered bog standard by competitors such as Maple and Mathematica.  I haven’t confirmed this yet. (confirmed by email from a PTC employee)
  • At the time of writing, all purchasers of Mathcad Prime 1.0 will also receive Mathcad 15. Mathcad Prime 1.0 can be installed side by side with any previous versions of Mathcad. (source)
  • In the UK, Mathcad Prime currently costs £810 for a personal license. (source)

Here’s a nice demo of the new version by Jackov Kucan. The user interface looks great in my opinion although I confess to not being a fan of the Microsoft-like ribbon interface.

How about you?  Have you used MathCAD prime yet?  If so then what do you think of it?  If not then do you think you will try it?

Update (16th February 2011): I was recently contacted by an employee of PTC who told me ‘The internal engine has not been totally rewritten .  It’s the user interface, which includes the equation editor and plots that we rebuilt from scratch.’  Thanks for the clarification.

If you like this post then you may also be interested in the following:

November 13th, 2010

Christmas isn’t all that far away so I thought that it was high time that I wrote my Christmas list for mathematical software developers and vendors.  All I want for christmas is….



  • Merge the parallel computing toolbox with core MATLAB.  Everyone uses multicore these days but only a few can feel the full benefit in MATLAB.   The rest are essentially second class MATLAB citizens muddling by with a single core (most of the time)
  • Make the mex interface thread safe so I can more easily write parallel mex files


  • More CUDA accelerated functions please.  I was initially excited by your CUDA package but then discovered that it only accelerated one function (Matrix Multiply).  CUDA accelerated Random Number Generators would be nice along with fast Fourier transforms and a bit more linear algebra.


  • Release Mathcad Prime.
  • Mac and Linux versions of Mathcad.  Maple,Mathematica and MATLAB have versions for all 3 platforms so why don’t you?

NAG Library

  • Produce vector versions of functions like g01bk (poisson distribution function).  They might not be needed in Fortran or C code but your MATLAB toolbox desperately needs them
  • A Mac version of the MATLAB toolbox.  I’ve got users practically begging for it :)
  • A NAG version of the MATLAB gamfit command



  • A Locator control for the interact function.  I still have a bounty outstanding for the person who implements this.
  • A fully featured, native windows version.  I know about the VM solution and it isn’t suitable for what I want to do (which is to deploy it on around 5000 University windows machines to introduce students to one of the best open source maths packages)

SMath Studio

  • An Android version please.  Don’t make it free – you deserve some money for this awesome Mathcad alternative.

SpaceTime Mathematics

  • The fact that you give the Windows version away for free is awesome but registration is a pain when you are dealing with mass deployment.  I’d love to deploy this to my University’s Windows desktop image but the per-machine registration requirement makes it difficult.  Most large developers who require registration usually come up with an alternative mechanism for enterprise-wide deployment.  You ask schools with more than 5 machines to link back to you.  I want tot put it on a few thousand machines and I would happily link back to you from several locations if you’ll help me with some sort of volume license.  I’ll also give internal (and external if anyone is interested) seminars at Manchester on why I think Spacetime is useful for teaching mathematics.  Finally, I’d encourage other UK University applications specialists to evaluate the software too.
  • An Android version please.

How about you?  What would you ask for Christmas from your favourite mathematical software developers?

April 14th, 2010

I’ve been following the progress of Mathcad Prime, the upcoming replacement for PTC’s Mathcad, for a few months now and have managed to get my hands on a few preview screen shots. Click on each image to obtain a full resolution version

Mathcad Prime matrix

Mathcad Prime plot

Mathcad Prime Programming

I’m particularly pleased to see that final image since it demonstrates that Mathcad Prime will support programming constructs. There were rumours a while ago that Prime would not be capable of either symbolics or programming which concerned me somewhat because I support users that require both.

A couple of weeks ago, PTC arranged a virtual conference where a couple of PTC developers demonstrated the latest build of Mathcad Prime.  The focus was very much on Prime’s ease of use and its ability to handle units and I have to say I was impressed – it seems to be a big improvement over Mathcad 14.  As long as symbolics makes it into Prime then I think I am going to be rather happy with it.

It is still possible to check out the recordings of the virtual conference yourself at (requires registration).  If you’ve seen the presentation then I’d love to know what you think so drop me a comment and say hi.

April 3rd, 2010

Andrey Ivashov’s free Mathcad alternative for Windows, Linux and Windows Mobile has recently been updated to version 0.87.3728 beta. This is a significant new release for SMath studio since this beta version adds support for units – possibly one of the most requested features on Andrey’s user forums.

I last looked at SMath Studio back in September 2009 and Andrey has made a lot of progress since then. As well as adding support for units and fixing some bugs he has added a whole host of user interface improvements including

  • Dynamic assistance – SMath Studio can now be set to give you syntax hints and tips as you type your code.
  • Support for plugins – Now we can all write something for SMath Studio
  • A much smoother looking user interface – SMath Studio now looks much more professional than before

Smath studio on Linux

This fantastic free alternative to Mathcad is going from strength to strength and I am really enjoying watching its progress.  Andrey has produced something that is genuinely useful, multiplatform, fun to use and, most importantly of all, he listens to his users.  Well worth a download.

January 23rd, 2010

Mathcad logo

Ever since PTC bought Mathcad from its original developers, Mathsoft, back in 2006 the future for the product has been uncertain.  The first PTC-led release of the software, Mathcad 14, followed a few months later to mixed reviews and it’s been very quiet ever since.  The only sign of life over the last couple of years has been a few minor bug-fix releases which, to be perfectly frank,  is rather insignificant compared to the competition.

All of this led me to write an article back in June 2009 called ‘Is Mathcad Dying?’ which garnered quite a lot of feedback from both the Mathcad user community and from PTC themselves.  The reaction from the user community ranged from people calling me some colourful names through to those who agreed with much of what I said and everything in between.  It quickly became apparent that there was a large user community who were fervently hoping that PTC would do something special with Mathcad rather than let it wither and die.  These users feel that Mathcad brings something unique to the technical software landscape; something that isn’t provided by the likes of Mathematica, MATLAB and Maple and they didn’t want it to go away.

In the meantime, some of the people at PTC got in touch with me to tell me that Mathcad is far from dying.  I learned that not only was a new release of Mathcad on the cards (Mathcad 15) but that they were also working on what was essentially a complete reboot of the system called Mathcad Prime.  They had also performed an internal company restructure which included the creation of a business unit specifically for Mathcad; this, I was told, would allow them to do much more with Mathcad than had been done before.  It all sounded very exciting and I was looking forward to a host of public updates but then it all went very quiet again.

Until now!

One of my contacts at PTC sent me a tweet last night to say that I might be interested in a blog post over at and he was right.  Finally, everything that I had been told in confidence has been made official and more besides.  Mathcad 15 will be released later this year.  The date for Mathcad Prime is a little more vague but 2011 seems like a distinct possibility and there will be a virtual conference in mid-March where PTC will tell us more about its Mathcad strategy (I’ve already signed up).

I have to confess that I have never been a fan of Mathcad, preferring to use MATLAB, Mathematica and Maple, but I have been deeply impressed by the loyalty shown by some of its long-term users.  Some of these users have been kind enough to take the time to show me why they believe that Mathcad deserves such allegiance and I now realise that some of my earlier comments on the product were not as well thought out as they should have been.   So, I hope that these new developments by PTC not only repays this loyalty but also produces a product that I would want to use myself.

Update (1st July 2010): Mathcad 15 has been released now (over 3 years since the last version if I recall correctly) and the list of new features appears to be rather underwhelming at first glance.  I’ll write more when I get my copy (assuming that there is more to write about).  I guess PTC are putting all of their resources into Mathcad Prime right now.

September 29th, 2009

So here’s a way of using Mathematica that, I have to admit, never occurred to me.

Essentially the idea is to make a big, empty graphic and then use the 2d drawing tools palette tools along with equation palettes and the ‘Evaluate in place’ menu item to produce a Mathcad-like interface. I like it!

It’s a neat trick but I highly doubt that it would be enough to lure Mathcad users away from their application of choice. Any thoughts?

September 2nd, 2009

Smath Studio is a freeware alternative to Mathcad developed by Andrey Ivashov for Windows, Linux and Windows Mobile.  The latest release, version 0.85, was made available yesterday for all platforms and includes a lot of new functionality combined with a set of bug-fixes.  A small selection of the improvements is shown below but you should head over to the SMath forum to see the full list of changes

  • Every page now has its own thread for evaluation – The user can evaluate pages even if evaluation of one of them in progress;
  • Multi-threading implemented for the Plot Controls;
  • Added ability to convert English symbols of the Math and Text Controls to Greek characters with a Ctrl+G keystroke;
  • New functions implemented: eval(..), polyroots(..), reverse(..), sort(..), rsort(..), csort(..), normi(..), norm1(..), norme(..), linterp(..), cinterp(..) and ainterp(..);
  • Functions for(..) and while(..) condition evaluating improved;
  • Added support for Infinity into Symbolic Library;
  • Function if(..) can be used in symbolic calculations now;
  • Native support of functions added: abs(..), trunc(..), mod(..), round(..) in Symbolic Library;
  • Composition of Logarithms simplification added into Symbolic Library;
  • Danish translation added;

Smath studio on Linux

SMath Studio is an extremely promising project that has already caught the interest of many Mathcad users (it even has basic compatibility with Mathcad’s file format) and is well worth the download.  Let me know if you try it out.

More about free mathematical software from Walking Randomly

Update 3rd April 2010: version 0.85 is now out of date. Click here for the latest version of SMath Studio.

July 31st, 2009

It won’t be long before I give up Windows Mobile for good in favour of the HTC Hero and the Android operating system but before I do I thought I would take one last look at what’s out there in terms of mathematical software for the Windows Mobile platform.  I last looked at this back in early 2008 but one or two things have changed since then.

SMath running on Windows Mobile

SMath studio is a very nice free maths application that is being developed by Andrey Ivashov for Windows and Linux (via Mono) desktops  as well as Windows Mobile handhelds.  It installed perfectly on my HTC TyTn II and offers an experience very similar to a simplified version of PTC’s Mathcad and can even handle Mathcad’s .xmcd file format in some cases.  One cool feature to consider is that you can develop calculations on the desktop version (screen shot below) and then carry them around, edit and run them on your Windows Mobile phone (screenshot above).

SMath running on Linux

Andrey has recently released version 0.82 of the software and there are some active forums over at his website in both English and Russian where you can discuss it.  This software is well worth watching in my opinion.  Although I won’t be able to follow the Windows Mobile versions after next week, I’ll definitely be keeping an eye on SMath for Linux and Windows and hope to bring a more detailed review to you at some point in the future.