Jump to content
Sign in to follow this  
Daniel W.

Include file for defining PI

Recommended Posts

Hi,

i wrote this file with the help of http://3.141592653589793238462643383279502...0974944592.com/

You can use it with

#include <PI.au3>

Regards Daniel W.

PI.au3


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

What do you mean with that?


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

Its splitted because i dont like script where i cant see the whole line...


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

If your declaring math things, here are a bunch of 'magic' math numbers I know nothing about, lol. I found them in the autoit src, in qmath.h. I'm not sure if they will help or not, but I think I remember some of the names when I was last pushing random buttons on my calculator to see what they would do... :D And don't laugh at that too hard, I know some of you have done that at least once in your life. And if not, forget I said that lol.

// M_ constants

#define M_E (2.71828182845904523536)

#define M_LOG2E (1.44269504088896340736)

#define M_LOG10E (0.434294481903251827651)

#define M_LN2 (0.693147180559945309417)

#define M_LN10 (2.30258509299404568402)

#define M_PI (3.14159265358979323846)

#define M_PI_2 (1.57079632679489661923)

#define M_PI_4 (0.785398163397448309616)

#define M_1_PI (0.318309886183790671538)

#define M_2_PI (0.636619772367581343076)

#define M_1_SQRTPI (0.564189583547756286948)

#define M_2_SQRTPI (1.12837916709551257390)

#define M_SQRT2 (1.41421356237309504880)

#define M_SQRT_2 (0.707106781186547524401)

AutoIt:
Global Const $M_E =   2.71828182845904523536
Global Const $M_LOG2E =  1.44269504088896340736
Global Const $M_LOG10E = 0.434294481903251827651
Global Const $M_LN2 =  0.693147180559945309417
Global Const $M_LN10 =  2.30258509299404568402
Global Const $M_PI =  3.14159265358979323846
Global Const $M_PI_2 =  1.57079632679489661923
Global Const $M_PI_4 =  0.785398163397448309616
Global Const $M_1_PI =  0.318309886183790671538
Global Const $M_2_PI =  0.636619772367581343076
Global Const $M_1_SQRTPI = 0.564189583547756286948
Global Const $M_2_SQRTPI = 1.12837916709551257390
Global Const $M_SQRT2 =  1.41421356237309504880
Global Const $M_SQRT_2 = 0.707106781186547524401

Share this post


Link to post
Share on other sites

Pi is defined there but my definition is longer :D


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

Pi is defined there but my definition is longer :D

I suggest you check again. While yours is longer, it's also stored as a string. Also, when yours gets converted to a number, it'll be only as long as the maximum precision for the C double type. So all you've done is created a long string with the contents being that of PI.

Share this post


Link to post
Share on other sites

Thats annoying :D


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

Global Const $M_E =   2.71828182845904523536
Global Const $M_LOG2E =  1.44269504088896340736
Global Const $M_LOG10E = 0.434294481903251827651
Global Const $M_LN2 =  0.693147180559945309417
Global Const $M_LN10 =  2.30258509299404568402
Global Const $M_PI =  3.14159265358979323846
Global Const $M_PI_2 =  1.57079632679489661923
Global Const $M_PI_4 =  0.785398163397448309616
Global Const $M_1_PI =  0.318309886183790671538
Global Const $M_2_PI =  0.636619772367581343076
Global Const $M_1_SQRTPI = 0.564189583547756286948
Global Const $M_2_SQRTPI = 1.12837916709551257390
Global Const $M_SQRT2 =  1.41421356237309504880
Global Const $M_SQRT_2 = 0.707106781186547524401

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...