Site Tools


Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
sw:uc

This is an old revision of the document!


Quadratwurzel

The simplest square root algorithm is to simply subtract successive odd numbers and count the number of subtractions:
(9-1=8) (8-3=5) (5-5=0)
Three subtractions so the sq root of nine is 3.

Dezimalbrüche und Brüche wandeln

z.B.faktor=2.12345676
maxima: rat(2.12345676);
rat' replaced 2.12345676 by 172/81 = 2.123456790123457
Um mit Faktor zu multiplizieren: *172/81; dividieren: *81/172

scanf für unsigned int

unsigned int getint(void) {

unsigned int n=0;char c;
while (((c=getchar())>='0') && (c<='9')) n=10*n+(c-'0');
return n;

}

MSP430/gcc exec code im RAM

int machlang[15]={

      0xe3b2, 0x0031,   //xor #-1,&0x31    (emulating INV)
      0x4130            //ret
      };
      int (*machfn)() = NULL;
      machfn= (int (*)()) machlang;
      machfn();
sw/uc.1232882292.txt.gz · Last modified: 2024/04/15 00:43 (external edit)