Adept Scientific - English
The world's best software and hardware for research, science and engineering.
flag arrow
clearclear

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKdedksvnofi
Home
Products
Training
Events
 Buy Online
Downloads
Academic Discounts
Support
My Adept
International |  About Us |  Adept Scientific Blog |  Contact Us |  Press Room |  Jobs
Adept Scientific on Twitter Adept Scientific on LinkedIn


The Next Steps

• Ask us a question
• Buy Mathcad Now
• View Mathcad Pricing
•  Download a Demo
•  Request a Brochure
• Download a Brochure
• Find out about Training
• Meet Our Team
• Read our RSS Feeds

Learn More

Mathcad Home
Compare Mathcad 15
and Mathcad Prime 1.0

Version Comparison Chart
Mathcad's Mathematical
Functions

Mathcad Enterprise
Mathcad for Education
Rave Reviews
Add-ons

System Requirements

Latest Information

New Features in Mathcad
Prime 1.0

Mathcad Prime 1.0 movie
New Features in Mathcad 15
Using Mathcad and Excel
Engineering Application
Packs

Return on Investment

Service & Support

Patches & Downloads
Frequently Asked Questions
Search the Knowledge Base
Join the Discussion List
Search the List Archive

List Archives >  Mathcad List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MATHCAD] Recursion in MC8Pro

Search email archive for  

[MATHCAD] Recursion in MC8Pro
Author: Yblee    Posted: Fri, 9 Apr 1999 04:50:43 +0100 (
Posted from http://lists.adeptscience.co.uk/postmsg.phtml

Hi,

I found that recursive function definition is broken in MC8Pro2B. Just use the Index in Help to open the QuickSheet on recursion and you'll see. Is this a known bug or just my copy?

I also found that if you define functions in terms of other functions, and if the call to the other functions unfortunately have missing parameters somewhere up in the call chain, then the error is displayed only at the last function of the chain. I need to trace through all the way up the call chain to fix such errors. Terrible. (This does not occur in MC7Pro.)

Lastly, anyone know how to get around the 171! (factorial) limitation? I keep hitting this limit in combinatorics. Is there similar restriction in other packages like mathlab? Thanks!

Frankly, I'm getting more and more upset from using MathCAD. I started out with V6, then upgraded to V7. Bugs, bugs, bugs. I even send email to MathSoft to report bugs and suggest new features. No response. Then I upgraded to V8. Even more bugs. I again send bug report to MathSoft, again no response, not even an ACK! I feel like an idiot paying for the two upgrades.

Regards,
Jack


-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: /> To unsubscribe: Send in the body: unsubscribe mathcad
To: /> Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/


[MATHCAD] Re: Recursion in MC8Pro
Author: Ray Girvan    Posted: Fri, 9 Apr 1999 12:29:30 +0100
writes:

> Lastly, anyone know how to get around the 171! (factorial) limitation?
> I keep hitting this limit in combinatorics.

Depends how accurate you want it. I've occasionally dealt with big
factorials by taking log_10 of Stirling's formula.

> Is there similar restriction in other packages like mathlab?

You could try Derive; it can manage very big numbers, though the
interface and other facilities aren't up to Mathcad. How big a
factorial do you need?

Ray

--
+++ Technical Author +++ Topsham, Devon, UK
http://www.users.zetnet.co.uk/rgirvan/ +++ The Apothecary's Drawer


-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: /> To unsubscribe: Send in the body: unsubscribe mathcad
To: /> Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/


Re: [MATHCAD] Re: Recursion in MC8Pro
Author: Jack Lee    Posted: Sat, 10 Apr 1999 01:21:51

At 12:29 PM 4/9/99 +0100, you wrote:
>Depends how accurate you want it. I've occasionally dealt with big
>factorials by taking log_10 of Stirling's formula.

I tried this as well but the accuracy is not good enough. The results are
way off.

>You could try Derive; it can manage very big numbers, though the
>interface and other facilities aren't up to Mathcad.

Hmmm...that's too bad. It's really the interface that kept me using MathCAD.

>How big a factorial do you need?

I have models that need 1000! upwards. It's really a fraction having many
factorials on the numerator as well as the denominator. The end result is
still within 10^307 though.

Thanks for your suggestions.

Regards,
Jack

-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: /> To unsubscribe: Send in the body: unsubscribe mathcad
To: /> Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/


RE: [MATHCAD] Re: Recursion in MC8Pro
Author: Boris Pevzner    Posted: Fri, 9 Apr 1999 13:39:36 -0400
Jack - This factorial limitation is inherent in how numerical calculations
are handled on a 32-bit processor, so any 32-bit numerical software package
will have this or a similar limitation. Having said this, there are at least
two ways to perform the calculations that you want in Mathcad:

(1) Use Mathcad's symbolic processor for arbitrary-precision
arithmetics. Try typing "200!/190![Ctrl]." for example.

(2) Use the two new numerical combinatorics functions
(combin and permut) that we introduced in Mathcad 8
to address precisely the kinds of issues that
you've come up against.

Hope this helps,

Boris Pevzner
/>

>-----Original Message-----
>From: /> Behalf Of Jack Lee
>Sent: Saturday, April 10, 1999 1:22 AM
>To: /> >Subject: Re: [MATHCAD] Re: Recursion in MC8Pro
>
>At 12:29 PM 4/9/99 +0100, you wrote:
>>Depends how accurate you want it. I've occasionally dealt with big
>>factorials by taking log_10 of Stirling's formula.
>
>I tried this as well but the accuracy is not good enough. The results are
>way off.
>
>>You could try Derive; it can manage very big numbers, though the
>>interface and other facilities aren't up to Mathcad.
>
>Hmmm...that's too bad. It's really the interface that kept me
>using MathCAD.
>
>>How big a factorial do you need?
>
>I have models that need 1000! upwards. It's really a fraction having many
>factorials on the numerator as well as the denominator. The end result is
>still within 10^307 though.
>
>Thanks for your suggestions.
>
>Regards,
>Jack
>
>-------------------------------------------------------------
>The Mathcad List - Discussion, Support & News
> Contributions: /> >To unsubscribe: Send in the body: unsubscribe mathcad
> To: /> > Hosted by: Adept Scientific http://www.adeptscience.com
> List Archive: http://lists.adeptscience.co.uk/
>

-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: /> To unsubscribe: Send in the body: unsubscribe mathcad
To: /> Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/


[MATHCAD] Re: Recursion in MC8Pro
Author: Ray Girvan    Posted: Fri, 9 Apr 1999 19:27:47 +0100
Jack Lee writes:

> I tried [Sterling's formula] as well but the accuracy is not good
> enough. The results are way off.

Which version? There is a refined version (I only have the gamma
form here) which gives better accuracy by adding the polynomial for
the asymptotic term:

Gamma(n) apprx= SQRT(2*pi) * e^(-n) * n^(n-0.5) * (1 + delta_n)
where delta_n = 1/(12*n) + 1/(288*n^2) - 139/(51840*n^3) + ... etc

See http://www.lassp.cornell.edu/sethna/Cracks/Stirling.html

Ray

--
+++ Technical Author +++ Topsham, Devon, UK
http://www.users.zetnet.co.uk/rgirvan/ +++ The Apothecary's Drawer


-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: /> To unsubscribe: Send in the body: unsubscribe mathcad
To: /> Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/


[MATHCAD] Re: Recursion in MC8Pro
Author: Ray Girvan    Posted: Fri, 9 Apr 1999 19:54:28 +0100
(Boris Pevzner) writes:

> (1) Use Mathcad's symbolic processor for arbitrary-precision
> (2) Use the two new numerical combinatorics functions ...

What are the limits on these? Both will manage some expressions
containing n! where n > 170. but can they handle ones of the size
Jack was talking about? For instance:

2000! / 1500! [Ctrl]. and combin(2000,1500)

both fail with my copy of Mathcad 8. The first one says the variable
is too long to display, the second hits the usual 10^307 magnitude limit.

Jack - could you post a typical expression of the kind you need to solve?

Ray

--
+++ Technical Author +++ Topsham, Devon, UK
http://www.users.zetnet.co.uk/rgirvan/ +++ The Apothecary's Drawer


-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: /> To unsubscribe: Send in the body: unsubscribe mathcad
To: /> Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/


Re: [MATHCAD] Re: Recursion in MC8Pro
Author: Jack Lee    Posted: Sat, 10 Apr 1999 16:13:00

>Jack - could you post a typical expression of the kind you need to solve?

Sure. Attached the Erlang-C formula which hits the limit for large m. The
recursively defined version extends the limit a bit but still not good enough.

Regards,
Jack

 Attachments:
 erlang_c.mcd


[MATHCAD] Re: Recursion in MC8Pro
Author: Ray Girvan    Posted: Sat, 10 Apr 1999 20:10:38 +0100
Jack Lee writes:

> Attached the Erlang-C formula ..
> name="erlang_c.mcd"

OK; I *think* I have an answer. Essentially it uses the
high-precision polynomial Stirling approximation for n! to define a
function for ln(n!), then does all the factorial work in the
logarithmic domain to keep the magnitudes safe for Mathcad. I've
e-mailed it to you direct; but will repost it here if you find it works!

Ray

--
+++ Technical Author +++ Topsham, Devon, UK
http://www.users.zetnet.co.uk/rgirvan/ +++ The Apothecary's Drawer


-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: /> To unsubscribe: Send in the body: unsubscribe mathcad
To: /> Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/


Previous by date: Re: [MATHCAD] Plotting Multiple Data Sets,  Russ Roberts
Next by date: [MATHCAD] Re: Recursion in MC8Pro, Ray Girvan
Previous thread: [MATHCAD] Changing Default Symbolics Evaluation Style,  Alexander, Rob
Next thread: [MATHCAD] Recursion in MC8Pro, Yblee



Ready to buy?

Mathcad 15 (with 1 year maintenance) - includes FREE Mathcad Prime
Add to shopping basket
£ 970.00
Upgrade to Mathcad 15 individual licence from v14 single user licence - includes FREE Mathcad Prime
Add to shopping basket
£ 220.00
Upgrade to Mathcad 15 individual licence from v11, v12, v13 single user licence - includes FREE Mathcad Prime
Add to shopping basket
£ 290.00

Featured Downloads

Mathcad Prime 1.0 Datasheet
Mathcad Prime 1.0 and Mathcad 15 Comparison Chart
Mathcad Prime 1.0 Demo
Mathcad or Excel?
Mathcad Customer Story: Man B&W Diesel
Mathcad Customer Story: Stork Fokker Aerospace

Latest Downloads

Application Example: Faster Physical Modelling for Mathcad users
Mathcad Case Study - Breakthrough in Water Treatment Technology
Mathcad Whitepaper - Best practices in product development: Design studies & trade-off analyses
Mathcad 15 - New Design of Experiments Demo
Mathcad Prime 2.0 Pre-Launch Interview

Latest News

Mathcad Case Study - Breakthrough in Water Treatment Technology
PTC Recognizes Adept Scientific
PTC recognises Adept Scientific’s Mathcad quality
PTC recognises Adept Scientific’s Mathcad quality
PTC launches Mathcad® Prime 1.0™
adept

Top of the Page

Popular Links: ChemDraw | ChemOffice | Data Acquisition | Data Analysis | EndNote | Maple | MapleSim | Mathcad | MathType | Quality Analyst | Reference Manager | VisSim

EU ePrivacy Directive | Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2012, Adept Scientific plc.
Site designed and maintained by Lyndon Ash

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055