Almetare 1.20
Alle meine Taschenrechner - Eine C++-Bibliothek zur Entwicklung von Taschenrechnern
calc_sci.h
gehe zur Dokumentation dieser Datei
1//******************************************************************************
2// Copyright (c) 2002-2004 by Friedemann Seebass, Germany.
3// Dieses Programm ist freie Software. Siehe GNU GPL Notiz in Datei main.cpp.
4// This program is free software. See the GNU GPL notice in file main.cpp.
5// Projekt: Almetare - Alle meine Taschenrechner
6//******************************************************************************
11//******************************************************************************
12// Wann Wer Was
13// ---------- -------- ---------------------------------------------------------
14// 17.03.2003 fse Trennzeichen '#' bei Parametern durch '@' ersetzt. Siehe
15// Kommentar in calculator.cpp
16// 23.03.2002 fse erzeugt
17//******************************************************************************
18
19#ifndef CALC_SCI_H
20#define CALC_SCI_H
21
22#ifndef __cplusplus
23#error calc_sci.h is only for C++!
24#endif
25
26//******************************************************************************
27
28#include <string>
29#include "calculator.h"
30#include "util.h"
31
32//******************************************************************************
33
34enum AngMode { DEG, RAD, GRA };
35enum DspMode { NRM, SCI, FIX };
36enum FrcMode { STD, FRC, MIX };
37
38//******************************************************************************
39// Klasse ComputerSci: wissenschaftliche Tascherechner:
40//******************************************************************************
41
46
48{
49 void addSciSymsToSymTab();
50
51protected:
52 bool mIsInv;
53 bool mIsHyp;
56 AngMode mAngMode;
57
58 bool mapSci(string& sym);
59 bool mapInvSci(string& sym);
60 bool mapHypSci(string& sym);
61 bool mapFixSciInputSci(string& sym);
62
63public:
65 // Zugriff:
66 bool getIsInv () const { return mIsInv ; }
67 bool getIsHyp () const { return mIsHyp ; }
68 bool getIsFixInput() const { return mIsFixInput; }
69 bool getIsSciInput() const { return mIsSciInput; }
70 AngMode getAngMode () const { return mAngMode ; }
71 void setIsInv (bool isOn) { mIsInv = isOn; }
72 void setIsHyp (bool isOn) { mIsHyp = isOn; }
73 void setIsFixInput(bool isOn) { mIsFixInput = isOn; }
74 void setIsSciInput(bool isOn) { mIsSciInput = isOn; }
75 void setAngMode(AngMode mode = DEG) { mAngMode = mode; }
76 // Sonstiges:
77 string makeCompSciInfoStr();
78 virtual bool preProcess(string& in);
79 virtual void handlePercent() {};
80 virtual void aftProcess(string& in) { if (in != "inv") mIsInv = false; }
81 virtual bool map(string& sym) { return mapSci(sym); }
82 virtual string makeCompInfoStr() { return makeCompSciInfoStr(); }
83 friend ostream& operator<<(ostream& os, ComputerSci& c);
84};
85
86//******************************************************************************
87// Klasse DisplaySci: Display wissenschaftlicher Taschenrechner:
88//******************************************************************************
89
94
95class DisplaySci : public DisplayBase
96{
97 ComputerSci* mCompP;
98protected:
99 DspMode mDspMode ; // Display-Modus SCI, FIX, NRM
100 FrcMode mFrcMode ; // Fraction-Modus STD, FRC, MIX
101 string mInv ; // Invers-Modus
102 string mHyp ; // Hyperbolikus-Modus
103 string mDeg ; // Altgrad
104 string mRad ; // Bogenmass
105 string mGra ; // Neugrad
106 string mSci ; // Exponentialschreibweise
107 string mFix ; // Festkomma
108 bool mIsSxgMode; // Sexagesimal-Modus;
109 int mDigits ; // SCI: Anz. Nachkommastellen Mantisse; FIX: Anz. Nachkommastellen
110 int mShiftNum ; // Anz. der Stellen, um die in Exp.-Zahl Komma verschoben wird
111 int mEng ; // Engineering-Modus-Zaehler
112 double mForceSci ; // Zahl, ab der, wenn kleiner, zwangsweise SCI-Darstellung
113 void setModesSci();
114public:
116 void resetAngModes() { mDeg = mRad = mGra = "..."; }
117 void resetDspModes() { mSci = mFix = "..."; }
118 void setDeg() { resetAngModes(); mDeg = "DEG"; }
119 void setRad() { resetAngModes(); mRad = "RAD"; }
120 void setGra() { resetAngModes(); mGra = "GRA"; }
121 void setSci() { resetDspModes(); mSci = "SCI"; }
122 void setFix() { resetDspModes(); mFix = "FIX"; }
123 void setNrm() { resetDspModes(); }
124 void setSci(bool on) { if (on) mSci = "SCI"; else mSci = "..."; }
125 void setAngMode(AngMode am);
126 void setDspMode(DspMode dm);
127 void setFrcMode(FrcMode fm ) { mFrcMode = fm ; }
128 void setDigits (int digits) { mDigits = digits; }
129 void setEng (int eng ) { mEng = eng ; }
130 void setShiftNum(int shiftNum) { mShiftNum = shiftNum; }
131 void setSxgMode(bool isOn) { mIsSxgMode = isOn; }
132 void setForceSci(double limit) { mForceSci = limit; }
133 int getShiftNum() const { return mShiftNum; }
134 int getDigits () const { return mDigits ; }
135 int getEng () const { return mEng ; }
136 double getForceSci() const { return mForceSci; }
137 DspMode getDspMode () const { return mDspMode ; }
138 FrcMode getFrcMode () const { return mFrcMode ; }
139 virtual void setInv (bool on) { mInv = on ? "INV" : "..."; } // Casio fx-85v: "s"
140 virtual void setHyp (bool on) { mHyp = on ? "hyp" : "..."; }
141 virtual void setModes();
142 virtual void makeValue();
143 virtual void makeSeven(string displayStr = "");
144};
145
146//******************************************************************************
147// zusaetzliche Symbole in wissenschaftlichen Taschenrechnern:
148//************************* ************************* **************************
149
151
152class NumPi : public SymNumber
153{
154public:
155 NumPi() : SymNumber("pi", "circle number 3.14...") {}
156 void process();
157};
158
159//************************* ************************* **************************
160
162
163class OpPow : public SymOperator
164{
165public:
166 OpPow() : SymOperator("pow", 6, "power") {}
167 Number calcVal(const Number& a, const Number& b);
168/* {
169 if (b.isFrc)
170 {
171 long numr = b.frc().getNumr();
172 if (numr == 1 || numr == -1)
173 {
174 if (numr == 1)
175 return Number(Util::root(a.getVal(), b.frc().getDnom()));
176 else
177 return Number(Util::root(a.getVal(), -b.frc().getDnom()));
178 }
179 else
180 return Number(pow(a.getVal(), b.getVal()));
181 }
182 else
183 return Number(pow(a.getVal(), b.getVal()));
184 }
185 */
186 void process() { processCommon(); }
187};
188
189//************************* ************************* **************************
190
192
193class OpRoot : public SymOperator
194{
195public:
196 OpRoot() : SymOperator("root", 6, "root") {}
197 Number calcVal(const Number& a, const Number& b) { return Number(Util::root(a.getVal(), b.getVal())); }
198 void process() { processCommon(); }
199};
200
201//************************* ************************* **************************
202
204
205class OpMod : public SymOperator
206{
207public:
208 OpMod() : SymOperator("mod", 4, "modulo") {}
209 Number calcVal(const Number& a, const Number& b) { return Number((long)a.getVal() % (long)b.getVal()); }
210 void process() { processCommon(); }
211};
212
213//************************* ************************* **************************
214
216
217class OpGcd : public SymOperator
218{
219public:
220 OpGcd() : SymOperator("gcd", 4, "greatest common divisor") {}
221 Number calcVal(const Number& a, const Number& b) { Fraction f((long)a.getVal(), (long)b.getVal()); return Number(f.gcd()); }
222 void process() { processCommon(); }
223};
224
225//************************* ************************* **************************
226
228
229class OpLcm : public SymOperator
230{
231public:
232 OpLcm() : SymOperator("lcm", 4, "least common multiplier") {}
233 Number calcVal(const Number& a, const Number& b) { Fraction f((long)a.getVal(), (long)b.getVal()); return Number(f.lcm()); }
234 void process() { processCommon(); }
235};
236
237//****************** ******************* ******************* *******************
238
240
242{
243public:
244 FnRcp() : SymOtherFunction("rcp", "reciprocal") {}
245 Number calcVal(const Number& a);
246};
247
248//****************** ******************* ******************* *******************
249
251
253{
254public:
255 FnSqr() : SymOtherFunction("sqr", "square") {}
256 Number calcVal(const Number& a) { return a*a; }
257};
258
259//****************** ******************* ******************* *******************
260
262
263class FnEx : public SymOtherFunction
264{
265public:
266 FnEx() : SymOtherFunction("ex", "natural antilogarithm") {}
267 Number calcVal(const Number& a) { return exp(a.getVal()); }
268};
269
270//****************** ******************* ******************* *******************
271
273
274class FnLn : public SymOtherFunction
275{
276public:
277 FnLn() : SymOtherFunction("ln", "natural logarithm") {}
278 Number calcVal(const Number& a) { return log(a.getVal()); }
279};
280
281//****************** ******************* ******************* *******************
282
284
286{
287public:
288 FnPow10() : SymOtherFunction("pow10", "common antilogarithm") {}
289 Number calcVal(const Number& a) { return pow(10.0, a.getVal()); }
290};
291
292//****************** ******************* ******************* *******************
293
295
297{
298public:
299 FnLog() : SymOtherFunction("log", "common logarithm") {}
300 Number calcVal(const Number& a) { return log10(a.getVal()); }
301};
302
303//************************* ************************* **************************
304
306
308{
309public:
310 explicit SymTrigFunction(string sym = "", string hlp = "no help available")
311 : SymFunction(sym, hlp) {}
312 void process();
313 double radToDegOrGra(double ang) const;
314 double DegOrGraToRad(double ang) const;
315 virtual Number calcVal(const Number& a) = 0;
316};
317
318//****************** ******************* ******************* *******************
319
321
322class FnSin : public SymTrigFunction
323{
324public:
325 FnSin() : SymTrigFunction("sin", "sine") {}
326 Number calcVal(const Number& a) { return sin(a.getVal()); }
327};
328
329//****************** ******************* ******************* *******************
330
332
334{
335public:
336 FnAsin() : SymTrigFunction("asin", "arc sine") {}
337 Number calcVal(const Number& a) { return asin(a.getVal()); }
338};
339
340//****************** ******************* ******************* *******************
341
343
344class FnCos : public SymTrigFunction
345{
346public:
347 FnCos() : SymTrigFunction("cos", "cosine") {}
348 Number calcVal(const Number& a) { return cos(a.getVal()); }
349};
350
351//****************** ******************* ******************* *******************
352
354
356{
357public:
358 FnAcos() : SymTrigFunction("acos", "arc cosine") {}
359 Number calcVal(const Number& a) { return acos(a.getVal()); }
360};
361
362//****************** ******************* ******************* *******************
363
365
366class FnTan : public SymTrigFunction
367
368{
369public:
370 FnTan() : SymTrigFunction("tan", "tangent") {}
371 Number calcVal(const Number& a) { return tan(a.getVal()); }
372};
373
374//****************** ******************* ******************* *******************
375
377
379{
380public:
381 FnAtan() : SymTrigFunction("atan", "arc tangent") {}
382 Number calcVal(const Number& a) { return atan(a.getVal()); }
383};
384
385//************************* ************************* **************************
386
388
389class AcInv : public SymAction
390{
391public:
392 AcInv() : SymAction("inv", "set/reset invers mode") {}
393 void process();
394};
395
396//************************* ************************* **************************
397
399
400class AcHyp : public SymAction
401{
402public:
403 AcHyp() : SymAction("hyp", "set/reset hyperbolicus mode for trig. functions") {}
404 void process();
405};
406
407//************************* ************************* **************************
408
410
411class AcConst : public SymAction
412{
413public:
414 AcConst() : SymAction("const", "set constant operation") {}
415 void process();
416};
417
418//************************* ************************* **************************
419
421
422class AcDeg : public SymAction
423{
424public:
425 AcDeg() : SymAction("deg", "degree mode (trigonometric functions)") {}
426 void process() { static_cast<ComputerSci*>(mCompP)->setAngMode(DEG); }
427};
428
429//************************* ************************* **************************
430
432
433class AcRad : public SymAction
434{
435public:
436 AcRad() : SymAction("rad", "radian mode (trigonometric functions)") {}
437 void process() { static_cast<ComputerSci*>(mCompP)->setAngMode(RAD); }
438};
439
440//************************* ************************* **************************
441
443
444class AcGra : public SymAction
445{
446public:
447 AcGra() : SymAction("gra", "grad mode (trigonometric functions)") {}
448 void process() { static_cast<ComputerSci*>(mCompP)->setAngMode(GRA); }
449};
450
451//************************* ************************* **************************
452
454
455class AcNrm : public SymAction
456{
457public:
458 AcNrm() : SymAction("nrm", "normal display mode") {}
459 void process();
460};
461
462//************************* ************************* **************************
463
465// fse, 17.03.03: Trennzeichen '#' durch '@' ersetzt
466
467class AcSci : public SymAction
468{
469public:
470 AcSci() : SymAction("sci", "scientific display mode ('sci@4')") {}
471 void process();
472};
473
474//************************* ************************* **************************
475
477// fse, 17.03.03: Trennzeichen '#' durch '@' ersetzt
478
479class AcFix : public SymAction
480{
481public:
482 AcFix() : SymAction("fix", "fixed display mode ('fix@4')") {}
483 void process();
484};
485
486//************************* ************************* **************************
487
489
490class AcFrc : public SymAction
491{
492public:
493 AcFrc() : SymAction("frc", "fraction display mode (if number is fraction)") {}
494 void process() { static_cast<DisplaySci*>(mDsplP)->setFrcMode(FRC); }
495};
496
497//************************* ************************* **************************
498
500class AcMix : public SymAction
501{
502public:
503 AcMix() : SymAction("mix", "mixed fraction display mode (if number is fraction)") {}
504 void process() { static_cast<DisplaySci*>(mDsplP)->setFrcMode(MIX); }
505};
506
507//************************* ************************* **************************
508
510
511class AcStd : public SymAction
512{
513public:
514 AcStd() : SymAction("std", "fraction display mode off") {}
515 void process() { static_cast<DisplaySci*>(mDsplP)->setFrcMode(STD); }
516};
517
518//************************* ************************* **************************
519
521
523{
524protected:
525 static int mShiftNumMax; // TI-30: hoechstens 5 Verschiebungen
526// int mShiftNum; // evtl. obsolet
527 void shiftEng(Util::Direction dir);
528public:
529 explicit AcShiftPoint(string sym = "", string hlp = "no help available")
530 : SymAction(sym, hlp) {}
531// : SymAction(sym, hlp), mShiftNum(-1) {}
532};
533
534//****************** ******************* ******************* *******************
535
537// fse, 17.03.03: Trennzeichen '#' durch '@' ersetzt
538
539class AcEe : public AcShiftPoint
540{
541public:
542 AcEe() : AcShiftPoint("ee", "shift decimal point ('ee@2')") {}
543 void process();
544};
545
546//****************** ******************* ******************* *******************
547
550
551class AcEng : public AcShiftPoint
552{
553public:
554 AcEng() : AcShiftPoint("eng", "shift decimal point three pos. right") {}
555 void process();
556};
557
558//************************* ************************* **************************
559
562
564{
565public:
566 AcEngBack() : AcShiftPoint("engback", "shift decimal point three pos. left") {}
567 void process();
568};
569
570//************************* ************************* **************************
571
573
575{
576protected:
577 double expemx (double x) const { double ret = exp(x) + exp(-x); return ret;}
578 double exmemx (double x) const { double ret = exp(x) - exp(-x); return ret;}
579 double sqrtx2p1 (double x) const { return sqrt(x*x+1.0) ; }
580 double sqrtx2m1 (double x) const { return sqrt(x*x-1.0) ; }
581public:
582 explicit SymHyperbolicFunction(string sym = "", string hlp = "no help available")
583 : SymOtherFunction(sym, hlp) {}
584};
585
586//****************** ******************* ******************* *******************
587
589
591{
592public:
593 FnSinh() : SymHyperbolicFunction("sinh", "hyperbolic sine") {}
594 Number calcVal(const Number& a) { double x = a.getVal(); return 0.5 * exmemx(x); }
595};
596
597//****************** ******************* ******************* *******************
598
600
602{
603public:
604 FnAsinh() : SymHyperbolicFunction("asinh", "hyperbolic arc sine") {}
605 Number calcVal(const Number& a) { double x = a.getVal(); return log(x + sqrtx2p1(x)); }
606};
607
608//****************** ******************* ******************* *******************
609
611
613{
614public:
615 FnCosh() : SymHyperbolicFunction("cosh", "hyperbolic cosine") {}
616 Number calcVal(const Number& a) { double x = a.getVal(); return 0.5 * expemx(x); }
617};
618
619//****************** ******************* ******************* *******************
620
622
624{
625public:
626 FnAcosh() : SymHyperbolicFunction("acosh", "hyperbolic arc cosine") {}
627 Number calcVal(const Number& a) { double x = a.getVal(); return log(x + sqrtx2m1(x)); }
628};
629
630//****************** ******************* ******************* *******************
631
633
635{
636public:
637 FnTanh() : SymHyperbolicFunction("tanh", "hyperbolic tangent") {}
638 Number calcVal(const Number& a) { double x = a.getVal(); return exmemx(x) / expemx(x); }
639};
640
641//****************** ******************* ******************* *******************
642
644
646{
647public:
648 FnAtanh() : SymHyperbolicFunction("atanh", "hyperbolic arc tangent") {}
649 Number calcVal(const Number& a) { double x = a.getVal(); return 0.5 * log((1.0+x)/(1.0-x)); }
650};
651
652//******************************************************************************
653//************************************** ***************************************
654//************************* ************************* **************************
655
656#endif // !CALC_SCI_H
FrcMode
Anzeige: normal, exponential, Festkomma.
Definition: calc_sci.h:36
DspMode
Winkelmodus Altgrad, Neugrad oder Rad.
Definition: calc_sci.h:35
Basisklassen fuer alle Taschenrechner (Modul base)
Schaltet Rechner in Konstanten-Modus.
Definition: calc_sci.h:412
void process()
Setzt Konstanten-Modus.
Definition: calc_sci.cpp:570
Schaltet Rechner in Altgrad-Modus (Kreis ist in 360° eingeteilt).
Definition: calc_sci.h:423
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse.
Definition: calc_sci.h:540
void process()
Verschiebt Dezimalpunkt der Anzeige um die Anzahl von Stellen, die im Parameter uebergeben wird.
Definition: calc_sci.cpp:647
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse um drei Stellen nach links.
Definition: calc_sci.h:564
void process()
Verschiebt Dezimalpunkt der Anzeige so nach links, dass der Exponent ein Vielfaches von 3 ist.
Definition: calc_sci.cpp:702
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse um drei Stellen nach rechts.
Definition: calc_sci.h:552
void process()
Verschiebt Dezimalpunkt der Anzeige so nach links, dass der Exponent ein Vielfaches von 3 ist.
Definition: calc_sci.cpp:690
Schaltet Rechner in Festkommamodus (FIX).
Definition: calc_sci.h:480
void process()
Setzt Display-Modus auf FIX.
Definition: calc_sci.cpp:621
Schaltet Rechner in Bruchdarstellungsmodus.
Definition: calc_sci.h:491
Schaltet Rechner in Neugrad-Modus (Kreis ist in 400 Neugrad eingeteilt).
Definition: calc_sci.h:445
Schaltet Rechner in Hyperbolicus-Modus.
Definition: calc_sci.h:401
void process()
Setzt Hyperbolikus-Modus.
Definition: calc_sci.cpp:557
Schaltet Rechner in Invers-Modus.
Definition: calc_sci.h:390
void process()
Setzt Invers-Modus.
Definition: calc_sci.cpp:544
Schaltet Rechner in Anzeigemodus "gemischter Bruch".
Definition: calc_sci.h:501
Schaltet Rechner in "normalen" Anzeigemodus (weder FIX noch SCI).
Definition: calc_sci.h:456
void process()
Setzt Display-Modus auf NRM.
Definition: calc_sci.cpp:581
Schaltet Rechner in Rad-Modus (Kreis ist in 2 pi rad eingeteilt).
Definition: calc_sci.h:434
Schaltet Rechner in wissenschaftlichen Anzeigemodus (SCI).
Definition: calc_sci.h:468
void process()
Setzt Display-Modus auf SCI.
Definition: calc_sci.cpp:596
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse.
Definition: calc_sci.h:523
void shiftEng(Util::Direction dir)
Verschiebt Dezimalpunkt der Anzeige so nach rechts oder links, dass der Exponent ein Vielfaches von 3...
Definition: calc_sci.cpp:714
Schaltet Bruchdarstellung wieder aus.
Definition: calc_sci.h:512
Basisklasse aller Computer.
Definition: calculator.h:85
Bruchdarstellung: Fliesskomma, Bruch, gemischter Bruch.
Definition: calc_sci.h:48
bool mapHypSci(string &sym)
Ordnet einem Symbol dasjenige Symbol zu, das ihm im Hyperbolicus-Modus entspricht (sin -> sinh,...
Definition: calc_sci.cpp:159
virtual void handlePercent()
Prozentrechnung des Solar-Rechners:
Definition: calc_sci.h:79
bool mapSci(string &sym)
Prueft verschiedene Shift-Ebenen und versucht, das Symbol sym entsprechend anzuupassen.
Definition: calc_sci.cpp:123
bool mapInvSci(string &sym)
Ordnet einem Symbol dasjenige Symbol zu, das ihm im Invers-Modus entspricht.
Definition: calc_sci.cpp:140
AngMode mAngMode
Modus RAD, DEG, GRA.
Definition: calc_sci.h:56
bool mIsHyp
Hyperbolicus.
Definition: calc_sci.h:53
bool mapFixSciInputSci(string &sym)
Macht aus einer Ziffer ein "fix"- oder "sci"-Symbol, wenn zuvor "fix" oder "sci" eingegeben wurde.
Definition: calc_sci.cpp:181
bool mIsSciInput
sci wurde gedrueckt, jetzt wird auf Ziffer gewartet
Definition: calc_sci.h:55
virtual bool preProcess(string &in)
Funktion erlaubt es, ein Symbol vor der eigentlichen Verarbeitung zu veraendern.
Definition: calc_sci.cpp:106
string makeCompSciInfoStr()
Erzeugt String mit den wichtigen Member-Variablen.
Definition: calc_sci.cpp:206
ComputerSci()
Der Konstruktor fuegt der Symboltabelle die zusaetzlichen Symbole fuer wissenschaftliche Taschenrechn...
Definition: calc_sci.cpp:40
bool mIsInv
Invers-Modus.
Definition: calc_sci.h:52
void addSciSymsToSymTab()
Funktion fuegt der Symboltabelle die zusaetzlichen Symbole fuer wissenschaftliche Taschenrechner hinz...
Definition: calc_sci.cpp:52
bool mIsFixInput
fix wurde gedrueckt, jetzt wird auf Ziffer gewartet
Definition: calc_sci.h:54
Basisklasse aller Displays.
Definition: calculator.h:190
Display fuer wissenschaftliche Taschenrechner.
Definition: calc_sci.h:96
void setAngMode(AngMode am)
Setzt die Winkelmodus-Strings.
Definition: calc_sci.cpp:278
void setModesSci()
Setzt die Modus-Strings auf die eingestellten Werte.
Definition: calc_sci.cpp:260
void setDspMode(DspMode dm)
Setzt die Display-Modus-Strings.
Definition: calc_sci.cpp:294
DisplaySci(ComputerBase *cbP)
Initialisiert das Display.
Definition: calc_sci.cpp:231
virtual void setModes()
Schaut im Computer, welche Modes gesetzt sind, und baut den Mode-String des Displays entsprechend zus...
Definition: calc_sci.cpp:247
virtual void makeValue()
Wandelt den Wert in mVal in einen String, aber nur, wenn irgendwelche Aenderungen am Wert oder der Da...
Definition: calc_sci.cpp:314
virtual void makeSeven(string displayStr="")
Erzeugt den String fuer die Sieben-Segment-Anzeige so wie sie der Taschenrechner darstellen wuerde.
Definition: calc_sci.cpp:379
Arcuscosinus-Funktion.
Definition: calc_sci.h:356
Areacosinus hyperbolicus.
Definition: calc_sci.h:624
Arcussinus-Funktion.
Definition: calc_sci.h:334
Areasinus hyperbolicus.
Definition: calc_sci.h:602
Arcustangens-Funktion.
Definition: calc_sci.h:379
Areatangens hyperbolicus.
Definition: calc_sci.h:646
Cosinus-Funktion.
Definition: calc_sci.h:345
Cosinus hyperbolicus.
Definition: calc_sci.h:613
Exponentialfunktion.
Definition: calc_sci.h:264
Natuerlicher Logarithmus.
Definition: calc_sci.h:275
Zehnerlogarithmus.
Definition: calc_sci.h:297
Potenzen zur Basis 10.
Definition: calc_sci.h:286
Reziprokwert.
Definition: calc_sci.h:242
Number calcVal(const Number &a)
Berechnet den Reziprokwert der Zahl a.
Definition: calc_sci.cpp:397
Sinus-Funktion.
Definition: calc_sci.h:323
Sinus hyperbolicus.
Definition: calc_sci.h:591
Quadrierfunktion.
Definition: calc_sci.h:253
Tangens-Funktion.
Definition: calc_sci.h:368
Tangens hyperbolicus.
Definition: calc_sci.h:635
Klasse zum Rechnen mit Bruechen.
Definition: fraction.h:85
long lcm() const
Berechnet das kleinste gemeinsame Vielfache (kgV) des Bruchs.
Definition: fraction.cpp:103
long gcd() const
Berechnet den groessten gemeinsamen Teiler (ggT) des Bruchs.
Definition: fraction.cpp:70
Kreiszahl pi.
Definition: calc_sci.h:153
void process()
Prozessiert das pi-Symbol. Pi wird berechnet und auf den Stack geworfen.
Definition: calc_sci.cpp:448
Die Klasse Number repraesentiert Zahlen.
Definition: number.h:49
Groesster gemeinsamer Teiler.
Definition: calc_sci.h:218
Kleinstes gemeinsames Vielfaches.
Definition: calc_sci.h:230
Modulo-Operator.
Definition: calc_sci.h:206
Allgemeine Potenz.
Definition: calc_sci.h:164
Number calcVal(const Number &a, const Number &b)
Allgemeine Potenz.
Definition: calc_sci.cpp:425
Allgemeine Wurzel.
Definition: calc_sci.h:194
Basisklasse fuer alle Aktionen ("=", "%", ...).
Definition: symbols.h:278
Basisklasse aller Funktionen.
Definition: symbols.h:242
Basisklasse fuer die hyperbolischen Winkelfunktionen.
Definition: calc_sci.h:575
Basisklasse fuer Zahlen.
Definition: symbols.h:74
Basisklasse fuer die Operatoren.
Definition: symbols.h:104
void processCommon()
Prozessiert einen eingegebenen Operator.
Definition: symbols.cpp:255
Basisklasse der Nicht-Winkelfunktionen.
Definition: symbols.h:253
Basisklasse fuer Winkelfunktionen.
Definition: calc_sci.h:308
double DegOrGraToRad(double ang) const
Wandelt einen Winkel von Neugrad oder Altgrad ins Bogenmass um.
Definition: calc_sci.cpp:503
void process()
Prozessiert alle Winkelfunktions-Symbole.
Definition: calc_sci.cpp:466
double radToDegOrGra(double ang) const
Wandelt einen Winkel vom Bogenmass in Altgrad oder Neugrad um.
Definition: calc_sci.cpp:525
static DisplayBase * mDsplP
Zeiger auf Display (f. wissenschftl. Rechner)
Definition: symbols.h:52
static ComputerBase * mCompP
Zeiger auf Computer mit der Symboltabelle.
Definition: symbols.h:51
static double root(double x, double y)
Berechnet x^(1/y).
Definition: util.cpp:1015
Allgemeine Funktionen (Modul lib)