[ nikola_rc @ 26.07.2006. 19:56 ] @
POZ!
Zanima me da li postoji u nekoj od C biblioteka definisana vrednost broja PI.

Znam za ono
#define PI 3.14
ali me zanima da li ima nesto sto je sistemski definisano kao konstanta PI?
[ X Files @ 26.07.2006. 20:33 ] @
Pogledaj ovde (ali pogledaj i napomene):
http://msdn2.microsoft.com/en-us/library/4hwaceh6.aspx
[ cvetkoj @ 26.07.2006. 23:20 ] @
>
pa sta znam, a i ovo pisem samo nesto da proverim

------=_Part_126269_16503904.1153952131551
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<br><br>
<div><span class="gmail_quote">2006/7/26, X Files &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Pogledaj ovde (ali pogledaj i napomene):<br>(<a href="http://msdn2.microsoft.com/en-us/library/4hwaceh6.aspx">
http://msdn2.microsoft.com/en-us/library/4hwaceh6.aspx</a>: <a href="http://msdn2.microsoft.com/en-us/library/4hwaceh6.aspx">http://msdn2.microsoft.com/en-us/library/4hwaceh6.aspx</a> )<br><br><br>--<br><a href="http://www.elitesecurity.org/p1227316">
http://www.elitesecurity.org/p...r><br>Prijave/odjave: <a href="http://www.elitesecurity.org/liste">http://www.elitesecurity.org/liste</a><br><br>Ne menjajte sledece dve linije ukoliko odgovarate putem emaila!<br>
esauth:196573:b1b0800539dd832dfc6f800848d3ba19<br>
[ darkon @ 27.07.2006. 12:08 ] @
U libc biblioteci pod Linux-om, u math.h header-u imaš konstantu M_PI.
Verovatno i pod Windows-om postoji slična konstanta u nekom sličnom header-u.
[ idb @ 27.07.2006. 12:33 ] @
U slucaju Windows-a i Mingw/GCC imas u math.h, evo deo ovog zaglavlja:
Code:

/* 
 * math.h
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is a part of the mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER within the package.
 *
 * Mathematical functions.
 *
 */


#ifndef _MATH_H_
#define _MATH_H_

#if __GNUC__ >= 3
#pragma GCC system_header
#endif

/* All the headers include this file. */
#include <_mingw.h>

/*
 * Types for the _exception structure.
 */

#define    _DOMAIN        1    /* domain error in argument */
#define    _SING        2    /* singularity */
#define    _OVERFLOW    3    /* range overflow */
#define    _UNDERFLOW    4    /* range underflow */
#define    _TLOSS        5    /* total loss of precision */
#define    _PLOSS        6    /* partial loss of precision */
/*
 * Exception types with non-ANSI names for compatibility.
 */

#ifndef    __STRICT_ANSI__
#ifndef    _NO_OLDNAMES

#define    DOMAIN        _DOMAIN
#define    SING        _SING
#define    OVERFLOW    _OVERFLOW
#define    UNDERFLOW    _UNDERFLOW
#define    TLOSS        _TLOSS
#define    PLOSS        _PLOSS

#endif    /* Not _NO_OLDNAMES */
#endif    /* Not __STRICT_ANSI__ */


/* Traditional/XOPEN math constants (double precison) */
#ifndef __STRICT_ANSI__
#define M_E        2.7182818284590452354
#define M_LOG2E        1.4426950408889634074
#define M_LOG10E    0.43429448190325182765
#define M_LN2        0.69314718055994530942
#define M_LN10        2.30258509299404568402
#define M_PI        3.14159265358979323846
#define M_PI_2        1.57079632679489661923
#define M_PI_4        0.78539816339744830962
#define M_1_PI        0.31830988618379067154
#define M_2_PI        0.63661977236758134308
#define M_2_SQRTPI    1.12837916709551257390
#define M_SQRT2        1.41421356237309504880
#define M_SQRT1_2    0.70710678118654752440
#endif
.
.
.

pozdrav idb