Jump to content

Include file for defining PI


Daniel W.
 Share

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]

Link to comment
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]

Link to comment
Share on other sites

Question... how many sig figs does autoit actually keep? Guessing its nowhere near as many as you have there... Anythign after 10 is most likely tossed out... but as I said I dont know how many sig figs autoit keeps.

Link to comment
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]

Link to comment
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
Link to comment
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]

Link to comment
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.
Link to comment
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]

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...