Simplifying Numerical Solving before actual solving

This is a discussion on Simplifying Numerical Solving before actual solving within the Tech Board forums, part of the Community Boards category; Hi all, I have a question not pertaining solely to C nor Programming in general. Nevertheless, I think there is ...

  1. #1
    Registered User Vespasian's Avatar
    Join Date
    Aug 2011
    Posts
    181

    Simplifying Numerical Solving before actual solving

    Hi all,

    I have a question not pertaining solely to C nor Programming in general. Nevertheless, I think there is no better place to ask (even in maths forums) than here..

    Suppose you have the following equation to solve:
    Name:  Capture.JPG
Views: 136
Size:  10.1 KB

    If we had to put that into a calculator or programme like Mathematica, mathcad, octave, MatLab, would those programms calculate AS IS or will they first simplify the equation then numerically calculate?

    In other Words, will these programmes actually perform a CPU intensive square root operation in the numerator and denominator and then carry on solving? Or, if these programmes are written smart enough, they could first look for grouping, distribution, cancellation of squares/roots, cancellation of numerators and denominators, which in this case, it would cancel the numerator and denominator and completely get away with square rooting.

    If they dont do this, is there a reason? Im sure it saves on CPU time especially if the simplifying is large. Or maybe they dont do this because the very operation of searching for cancellation consumes significant CPU time. Although having said that, I think that the operation of searching is linearly intensive O(n) while the potential for cancellation of square root operations (for example) saves on potential loss of O(log n) operations. So Im sure that these maths programms employ this simplifying technique.

  2. #2
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Simplification is much more complicated(to execute and program) than floating point operations (which have great hardware support).

    Though you could be right because much of the work needed for the simplification to work is already done while parsing the expression ...say..into a tree.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  3. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,597
    I'm sure it depends on the software. As to why they may _not_ do it, I imagine it's simply a matter of didn't have the time to add such functionality.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  4. #4
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    949
    A CAS is likely to do some canceling, whereas anything else is likely to just follow order of operations.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can anyone help me solving that Q?
    By Amjad Salman in forum C Programming
    Replies: 1
    Last Post: 03-04-2012, 10:50 AM
  2. How should I go about solving this problem?
    By ARod609 in forum C Programming
    Replies: 11
    Last Post: 08-06-2011, 09:37 PM
  3. Solving relationships...
    By hebali in forum C Programming
    Replies: 1
    Last Post: 03-03-2008, 10:15 AM
  4. C++ Problem Solving
    By scojan in forum C++ Programming
    Replies: 16
    Last Post: 10-16-2007, 10:41 AM
  5. Equation solving
    By Sang-drax in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 11-24-2002, 01:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21