This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Technology & Calculator Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Math and Science => Technology & Calculator Open Topic
Author Message
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 03 Feb 2006 06:53:40 pm    Post subject:

I did some dabbling over at The Wolfram Function Site several weeks ago, where I intended to find effective ways to calculate some of the well-known constants that aren't as readily available on the calculator as [font="times new roman"]π, e, or [font="times new roman"]Φ (believe it or not). Since I've put it off for a while, I might as well show what I have now before I lose what I've written down.

The important thing to me was getting the highest precision possible—all fourteen decimal places that the calculator supports was my ideal minimum. The means through which each constant was to be derived had to be a studied approach developed by mathematicians—approximations this time wouldn't cut it. I especially focused on methods that didn't take more than 20 seconds to compute! Of course, directly typing out the number to fourteen decimals is both cheaper in the number of bytes* as well as the time taken to generate the constant, but... Hey, that's beside the point. ;)

* Not true for all cases!

...and here they are:

Catalan's Constant
[font="courier new"]fnInt(tan‾¹(T)/T,T,0,1
fnInt(sinh‾¹(cos(T)),T,0,[font="times new roman"]π
/2

Euler-Mascheroni Constant
[font="courier new"]fnInt((1-e^(-T))/T,T,0,2)-fnInt(e^(-T)/T,T,2,26)-ln(2

Golden Ratio
[font="courier new"]2cos(36°

Khinchin's Constant
[font="courier new"]2e^(fnInt(log([font="times new roman"]π(T-T³)/sin([font="times new roman"]πT))/(T²+T),T,0,1)/log(2

There's one more thing, but I have a problem associated with it:

Glaisher-Kinkelin Constant
[s][font="courier new"][color=darkblue]12×√(2[font="times new roman"]πe^(fnInt((1-e^(-T))/T,T,0,2)-fnInt(e^(-T)/T,T,2,26)-ln(2))ζ´(2)^(6/[font="times new roman"]π[/color]²[/s]

(I don't know where or how I got that, but it doesn't work.)

The problem: [font="courier new"]ζ´(2)
I know what this is, but I can't seem to make the calculator produce it efficiently. By replacing the derivative of the zeta function with its decimal expansion, the constant gets every last decimal it needs, so all we need is a way to get that darn derivative. 8)

Any additions? Suggestions?

I'd stay away from optimizing on this topic, because earlier attempts actually ruined the decimal precision!

–Goose

Last edited by Guest on 10 Feb 2006 05:47:39 am; edited 1 time in total
Back to top
thornahawk
μολών λαβέ


Active Member


Joined: 27 Mar 2005
Posts: 569

Posted: 04 Feb 2006 01:59:05 am    Post subject:

In case it was missed:

http://www.unitedti.org/index.php?showtopic=4112

Commentary:

Apart from the straightforward .5(1+√(5)) and 2cos(.2π) (which is essentially what Goose gave), there's not too many practical Golden Ratio formulae. :)

Glaisher-Kinkelin really is a PITA to compute; and it's not just because of the zeta derivative. Surprised I'm still on the lookout in journals for articles pertaining to efficient computation.

Most confounding for me, however, is that there is not too much in the literature on efficient ways for computing the two Feigenbaum constants. The best method needs a large matrix for efficiency! Surprised That luxury isn't very affordable...

(edit:

A "no zeta" way of computing Glaisher-Kinkelin, after much algebraic manipulation:

e^(12ֿ¹–.5fnInt(ln(2/(1–X))ln(.5πֿ¹ln(2/(1–X)))/(1+X),X,-1,1,10^-11)/π²)

Whew! Cool Unfortunately, this doesn't take 20 seconds to compute on the TI 83+. :dry:

)

thornahawk


Last edited by Guest on 04 Feb 2006 09:37:22 am; edited 1 time in total
Back to top
AlienCC
Creative Receptacle!


Know-It-All


Joined: 24 May 2003
Posts: 1927

Posted: 04 Feb 2006 03:09:58 am    Post subject:

When I first saw this thread I misread the title as "Computing Consultants" which got me excited for a brief moment, until I read it again as "Computing Constants", obviously I won't have as many useful things to say here after all.

--AlienCC
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 10 Feb 2006 06:08:46 am    Post subject:

[font="courier new"]e^((ln(2[font="times new roman"]π)+
fnInt((1-e^(‾T))/T,T,0,2)-
fnInt(e^(‾T)/T,T,2,26)-ln(2))/12-.5/[font="times new roman"]π
²(1+(2(
fnInt(sin((2+E‾4)tan‾¹(T))/((T²+1)^((2+E‾4)/2)(e^(2[font="times new roman"]π
T)-1)),T,0,4)-
fnInt(sin((2-E‾4)tan‾¹(T))/((T²+1)^((2-E‾4)/2)(e^(2[font="times new roman"]πT)-1)),T,0,4)-
2E‾4)/2E‾4

Computing Time (84+SE): 10 seconds
Margin of Error: [font="courier new"]0.0000000000004 ([font="courier new"]4E‾13)
Back to top
thornahawk
μολών λαβέ


Active Member


Joined: 27 Mar 2005
Posts: 569

Posted: 10 Feb 2006 07:35:22 am    Post subject:

Long. *whistles* Neutral Which constant does that snippet compute? I don't have my calc at the moment.

Could you please time the snippet I gave for Glaisher-Kinkelin, Goose?

thornahawk
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 10 Feb 2006 03:09:51 pm    Post subject:

What I posted yields the Glaisher-Kinkelin constant. :lol:

I timed your code. It takes just under two minutes (within one second under) on
an 84+SE to compute the constant, with a difference of [font="courier new"]0.0000000000006
([font="courier new"]6E‾13).
Back to top
thornahawk
μολών λαβέ


Active Member


Joined: 27 Mar 2005
Posts: 569

Posted: 11 Feb 2006 01:02:20 am    Post subject:

Ah. :lol:

Still another Glaisher-Kinkelin snippet; shorter than the previous one I gave, but based on the same integral:

e^(12ֿ¹–.5fnInt(ln(X)ln(-.5ln(X)/π)/(X–1),X,0,1,10^-11)/π²)

Absolute error for that would be 2×10-13. Takes quite long like the first integral I gave, though. :hmpf:

(edit:

I tried out that long expression of yours and I got an overflow error. That actually worked? It seems like your approximating a derivative evaluated at 2 with those factors of 10^-4 in your expression; have you consideed using nDeriv( instead?

)

thornahawk


Last edited by Guest on 11 Feb 2006 04:00:06 am; edited 1 time in total
Back to top
CompWiz


Advanced Newbie


Joined: 16 Oct 2005
Posts: 66

Posted: 14 Feb 2006 06:19:23 pm    Post subject:

It would be nice if someone could make a version of cabamap that supports decimals and more functions. Computing constants would be that much faster and more precise that way.
Back to top
thornahawk
μολών λαβέ


Active Member


Joined: 27 Mar 2005
Posts: 569

Posted: 12 Oct 2007 11:42:49 pm    Post subject:

Yet another integral for Khinchin's constant:

℮^(-fnInt(log(sin(πX)/(πX))/(X+X²),X,0,1,10^-12)/log(2))

Here is an expression for the K-th Stieltjes constant γK:

fnInt(imag((ln(1–i*ln(X)/π)^K)/(sinh(ln(X))(π–i*ln(X)))),X,0,1,10^-13)

thornahawk
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement