-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
81 lines (57 loc) · 1.33 KB
/
main.c
File metadata and controls
81 lines (57 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* -------------------------------------------------------------------------------------------
* "THE MATE-WARE LICENSE" (Revision 42):
* Daniel Steuer <daniel.steuer@bingo-ev.de> schrieb diese Datei.
* Solange Sie diesen Vermerk nicht entfernen, können Sie mit dem Material machen,
* was Sie möchten. Wenn wir uns eines Tages treffen und Sie denken, das Material ist es wert,
* können Sie mir dafür eine Club-Mate ausgeben. Daniel Steuer
* -------------------------------------------------------------------------------------------
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "math.h"
#include "util.h"
fpn_t e;
fpn_t lastTerm;
/*
void longPrint( fpn_t a ) {
uint32_t i;
for( i=(PRECISION-PRE_POINT_DIGITS); i<PRECISION; i++ ) {
printf( "%i", a[i] );
}
printf( "." );
for( i=0; i<(PRECISION-PRE_POINT_DIGITS); i++ ) {
printf( "%i", a[i] );
}
printf( "\n" );
}
*/
int main( void ) {
uint32_t i;
// toFpn( 0, &e);
// e.num = 1;
lastTerm[PRECISION-1] = 1;
/* for( i=0; i < 10; i++ ) {
longDiv( lastTerm, i );
longAdd( e, lastTerm );
printf( "e=" );
longPrint( e );
}
*/
return 0;
}
void computeE( void ) {
// compute e:
// this is over when the number doesn't
// change anymore from step to step
//
// -- 1
// e = \ ----
// /_ n!
//
;
}
void computePi ( void ) {
;
}