Almetare  1.15
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 
34 enum AngMode { DEG, RAD, GRA };
35 enum DspMode { NRM, SCI, FIX };
36 enum FrcMode { STD, FRC, MIX };
37 
38 //******************************************************************************
39 // Klasse ComputerSci: wissenschaftliche Tascherechner:
40 //******************************************************************************
41 
46 
47 class ComputerSci : public ComputerBase
48 {
49  void addSciSymsToSymTab();
50 
51 protected:
52  bool mIsInv;
53  bool mIsHyp;
54  bool mIsFixInput;
55  bool mIsSciInput;
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 
63 public:
64  ComputerSci();
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 
95 class DisplaySci : public DisplayBase
96 {
97  ComputerSci* mCompP;
98 protected:
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();
114 public:
115  DisplaySci(ComputerBase* cbP);
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 
152 class NumPi : public SymNumber
153 {
154 public:
155  NumPi() : SymNumber("pi", "circle number 3.14...") {}
156  void process();
157 };
158 
159 //************************* ************************* **************************
160 
162 
163 class OpPow : public SymOperator
164 {
165 public:
166  OpPow() : SymOperator("pow", 6, "power") {}
167  Number calcVal(const Number& a, const Number& b) { return Number(pow(a.getVal(), b.getVal())); }
168  void process() { processCommon(); }
169 };
170 
171 //************************* ************************* **************************
172 
174 
175 class OpRoot : public SymOperator
176 {
177 public:
178  OpRoot() : SymOperator("root", 6, "root") {}
179  Number calcVal(const Number& a, const Number& b) { return Number(Util::root(a.getVal(), b.getVal())); }
180  void process() { processCommon(); }
181 };
182 
183 //************************* ************************* **************************
184 
186 
187 class OpMod : public SymOperator
188 {
189 public:
190  OpMod() : SymOperator("mod", 4, "modulo") {}
191  Number calcVal(const Number& a, const Number& b) { return Number((long)a.getVal() % (long)b.getVal()); }
192  void process() { processCommon(); }
193 };
194 
195 //************************* ************************* **************************
196 
198 
199 class OpGcd : public SymOperator
200 {
201 public:
202  OpGcd() : SymOperator("gcd", 4, "greatest common divisor") {}
203  Number calcVal(const Number& a, const Number& b) { Fraction f((long)a.getVal(), (long)b.getVal()); return Number(f.gcd()); }
204  void process() { processCommon(); }
205 };
206 
207 //************************* ************************* **************************
208 
210 
211 class OpLcm : public SymOperator
212 {
213 public:
214  OpLcm() : SymOperator("lcm", 4, "least common multiplier") {}
215  Number calcVal(const Number& a, const Number& b) { Fraction f((long)a.getVal(), (long)b.getVal()); return Number(f.lcm()); }
216  void process() { processCommon(); }
217 };
218 
219 //****************** ******************* ******************* *******************
220 
222 
223 class FnRcp : public SymOtherFunction
224 {
225 public:
226  FnRcp() : SymOtherFunction("rcp", "reciprocal") {}
227  Number calcVal(const Number& a);
228 };
229 
230 //****************** ******************* ******************* *******************
231 
233 
234 class FnSqr : public SymOtherFunction
235 {
236 public:
237  FnSqr() : SymOtherFunction("sqr", "square") {}
238  Number calcVal(const Number& a) { return a*a; }
239 };
240 
241 //****************** ******************* ******************* *******************
242 
244 
245 class FnEx : public SymOtherFunction
246 {
247 public:
248  FnEx() : SymOtherFunction("ex", "natural antilogarithm") {}
249  Number calcVal(const Number& a) { return exp(a.getVal()); }
250 };
251 
252 //****************** ******************* ******************* *******************
253 
255 
256 class FnLn : public SymOtherFunction
257 {
258 public:
259  FnLn() : SymOtherFunction("ln", "natural logarithm") {}
260  Number calcVal(const Number& a) { return log(a.getVal()); }
261 };
262 
263 //****************** ******************* ******************* *******************
264 
266 
267 class FnPow10 : public SymOtherFunction
268 {
269 public:
270  FnPow10() : SymOtherFunction("pow10", "common antilogarithm") {}
271  Number calcVal(const Number& a) { return pow(10.0, a.getVal()); }
272 };
273 
274 //****************** ******************* ******************* *******************
275 
277 
278 class FnLog : public SymOtherFunction
279 {
280 public:
281  FnLog() : SymOtherFunction("log", "common logarithm") {}
282  Number calcVal(const Number& a) { return log10(a.getVal()); }
283 };
284 
285 //************************* ************************* **************************
286 
288 
290 {
291 public:
292  explicit SymTrigFunction(string sym = "", string hlp = "no help available")
293  : SymFunction(sym, hlp) {}
294  void process();
295  double radToDegOrGra(double ang) const;
296  double DegOrGraToRad(double ang) const;
297  virtual Number calcVal(const Number& a) = 0;
298 };
299 
300 //****************** ******************* ******************* *******************
301 
303 
304 class FnSin : public SymTrigFunction
305 {
306 public:
307  FnSin() : SymTrigFunction("sin", "sine") {}
308  Number calcVal(const Number& a) { return sin(a.getVal()); }
309 };
310 
311 //****************** ******************* ******************* *******************
312 
314 
315 class FnAsin : public SymTrigFunction
316 {
317 public:
318  FnAsin() : SymTrigFunction("asin", "arc sine") {}
319  Number calcVal(const Number& a) { return asin(a.getVal()); }
320 };
321 
322 //****************** ******************* ******************* *******************
323 
325 
326 class FnCos : public SymTrigFunction
327 {
328 public:
329  FnCos() : SymTrigFunction("cos", "cosine") {}
330  Number calcVal(const Number& a) { return cos(a.getVal()); }
331 };
332 
333 //****************** ******************* ******************* *******************
334 
336 
337 class FnAcos : public SymTrigFunction
338 {
339 public:
340  FnAcos() : SymTrigFunction("acos", "arc cosine") {}
341  Number calcVal(const Number& a) { return acos(a.getVal()); }
342 };
343 
344 //****************** ******************* ******************* *******************
345 
347 
348 class FnTan : public SymTrigFunction
349 
350 {
351 public:
352  FnTan() : SymTrigFunction("tan", "tangent") {}
353  Number calcVal(const Number& a) { return tan(a.getVal()); }
354 };
355 
356 //****************** ******************* ******************* *******************
357 
359 
360 class FnAtan : public SymTrigFunction
361 {
362 public:
363  FnAtan() : SymTrigFunction("atan", "arc tangent") {}
364  Number calcVal(const Number& a) { return atan(a.getVal()); }
365 };
366 
367 //************************* ************************* **************************
368 
370 
371 class AcInv : public SymAction
372 {
373 public:
374  AcInv() : SymAction("inv", "set/reset invers mode") {}
375  void process();
376 };
377 
378 //************************* ************************* **************************
379 
381 
382 class AcHyp : public SymAction
383 {
384 public:
385  AcHyp() : SymAction("hyp", "set/reset hyperbolicus mode for trig. functions") {}
386  void process();
387 };
388 
389 //************************* ************************* **************************
390 
392 
393 class AcConst : public SymAction
394 {
395 public:
396  AcConst() : SymAction("const", "set constant operation") {}
397  void process();
398 };
399 
400 //************************* ************************* **************************
401 
403 
404 class AcDeg : public SymAction
405 {
406 public:
407  AcDeg() : SymAction("deg", "degree mode (trigonometric functions)") {}
408  void process() { static_cast<ComputerSci*>(mCompP)->setAngMode(DEG); }
409 };
410 
411 //************************* ************************* **************************
412 
414 
415 class AcRad : public SymAction
416 {
417 public:
418  AcRad() : SymAction("rad", "radian mode (trigonometric functions)") {}
419  void process() { static_cast<ComputerSci*>(mCompP)->setAngMode(RAD); }
420 };
421 
422 //************************* ************************* **************************
423 
425 
426 class AcGra : public SymAction
427 {
428 public:
429  AcGra() : SymAction("gra", "grad mode (trigonometric functions)") {}
430  void process() { static_cast<ComputerSci*>(mCompP)->setAngMode(GRA); }
431 };
432 
433 //************************* ************************* **************************
434 
436 
437 class AcNrm : public SymAction
438 {
439 public:
440  AcNrm() : SymAction("nrm", "normal display mode") {}
441  void process();
442 };
443 
444 //************************* ************************* **************************
445 
447 // fse, 17.03.03: Trennzeichen '#' durch '@' ersetzt
448 
449 class AcSci : public SymAction
450 {
451 public:
452  AcSci() : SymAction("sci", "scientific display mode ('sci@4')") {}
453  void process();
454 };
455 
456 //************************* ************************* **************************
457 
459 // fse, 17.03.03: Trennzeichen '#' durch '@' ersetzt
460 
461 class AcFix : public SymAction
462 {
463 public:
464  AcFix() : SymAction("fix", "fixed display mode ('fix@4')") {}
465  void process();
466 };
467 
468 //************************* ************************* **************************
469 
471 
472 class AcFrc : public SymAction
473 {
474 public:
475  AcFrc() : SymAction("frc", "fraction display mode (if number is fraction)") {}
476  void process() { static_cast<DisplaySci*>(mDsplP)->setFrcMode(FRC); }
477 };
478 
479 //************************* ************************* **************************
480 
482 class AcMix : public SymAction
483 {
484 public:
485  AcMix() : SymAction("mix", "mixed fraction display mode (if number is fraction)") {}
486  void process() { static_cast<DisplaySci*>(mDsplP)->setFrcMode(MIX); }
487 };
488 
489 //************************* ************************* **************************
490 
492 
493 class AcStd : public SymAction
494 {
495 public:
496  AcStd() : SymAction("std", "fraction display mode off") {}
497  void process() { static_cast<DisplaySci*>(mDsplP)->setFrcMode(STD); }
498 };
499 
500 //************************* ************************* **************************
501 
503 
504 class AcShiftPoint : public SymAction
505 {
506 protected:
507  static int mShiftNumMax; // TI-30: hoechstens 5 Verschiebungen
508 // int mShiftNum; // evtl. obsolet
509  void shiftEng(Util::Direction dir);
510 public:
511  explicit AcShiftPoint(string sym = "", string hlp = "no help available")
512  : SymAction(sym, hlp) {}
513 // : SymAction(sym, hlp), mShiftNum(-1) {}
514 };
515 
516 //****************** ******************* ******************* *******************
517 
519 // fse, 17.03.03: Trennzeichen '#' durch '@' ersetzt
520 
521 class AcEe : public AcShiftPoint
522 {
523 public:
524  AcEe() : AcShiftPoint("ee", "shift decimal point ('ee@2')") {}
525  void process();
526 };
527 
528 //****************** ******************* ******************* *******************
529 
532 
533 class AcEng : public AcShiftPoint
534 {
535 public:
536  AcEng() : AcShiftPoint("eng", "shift decimal point three pos. right") {}
537  void process();
538 };
539 
540 //************************* ************************* **************************
541 
544 
545 class AcEngBack : public AcShiftPoint
546 {
547 public:
548  AcEngBack() : AcShiftPoint("engback", "shift decimal point three pos. left") {}
549  void process();
550 };
551 
552 //************************* ************************* **************************
553 
555 
557 {
558 protected:
559  double expemx (double x) const { double ret = exp(x) + exp(-x); return ret;}
560  double exmemx (double x) const { double ret = exp(x) - exp(-x); return ret;}
561  double sqrtx2p1 (double x) const { return sqrt(x*x+1.0) ; }
562  double sqrtx2m1 (double x) const { return sqrt(x*x-1.0) ; }
563 public:
564  explicit SymHyperbolicFunction(string sym = "", string hlp = "no help available")
565  : SymOtherFunction(sym, hlp) {}
566 };
567 
568 //****************** ******************* ******************* *******************
569 
571 
573 {
574 public:
575  FnSinh() : SymHyperbolicFunction("sinh", "hyperbolic sine") {}
576  Number calcVal(const Number& a) { double x = a.getVal(); return 0.5 * exmemx(x); }
577 };
578 
579 //****************** ******************* ******************* *******************
580 
582 
584 {
585 public:
586  FnAsinh() : SymHyperbolicFunction("asinh", "hyperbolic arc sine") {}
587  Number calcVal(const Number& a) { double x = a.getVal(); return log(x + sqrtx2p1(x)); }
588 };
589 
590 //****************** ******************* ******************* *******************
591 
593 
595 {
596 public:
597  FnCosh() : SymHyperbolicFunction("cosh", "hyperbolic cosine") {}
598  Number calcVal(const Number& a) { double x = a.getVal(); return 0.5 * expemx(x); }
599 };
600 
601 //****************** ******************* ******************* *******************
602 
604 
606 {
607 public:
608  FnAcosh() : SymHyperbolicFunction("acosh", "hyperbolic arc cosine") {}
609  Number calcVal(const Number& a) { double x = a.getVal(); return log(x + sqrtx2m1(x)); }
610 };
611 
612 //****************** ******************* ******************* *******************
613 
615 
617 {
618 public:
619  FnTanh() : SymHyperbolicFunction("tanh", "hyperbolic tangent") {}
620  Number calcVal(const Number& a) { double x = a.getVal(); return exmemx(x) / expemx(x); }
621 };
622 
623 //****************** ******************* ******************* *******************
624 
626 
628 {
629 public:
630  FnAtanh() : SymHyperbolicFunction("atanh", "hyperbolic arc tangent") {}
631  Number calcVal(const Number& a) { double x = a.getVal(); return 0.5 * log((1.0+x)/(1.0-x)); }
632 };
633 
634 //******************************************************************************
635 //************************************** ***************************************
636 //************************* ************************* **************************
637 
638 #endif // !CALC_SCI_H
void process()
Setzt Display-Modus auf FIX.
Definition: calc_sci.cpp:596
Basisklasse aller Funktionen.
Definition: symbols.h:241
Tangens hyperbolicus.
Definition: calc_sci.h:616
Quadrierfunktion.
Definition: calc_sci.h:234
DspMode
Winkelmodus Altgrad, Neugrad oder Rad.
Definition: calc_sci.h:35
Exponentialfunktion.
Definition: calc_sci.h:245
virtual void setModes()
Schaut im Computer, welche Modes gesetzt sind, und baut den Mode-String des Displays entsprechend zus...
Definition: calc_sci.cpp:247
Basisklasse fuer die hyperbolischen Winkelfunktionen.
Definition: calc_sci.h:556
double radToDegOrGra(double ang) const
Wandelt einen Winkel vom Bogenmass in Altgrad oder Neugrad um.
Definition: calc_sci.cpp:500
bool mIsInv
Invers-Modus.
Definition: calc_sci.h:52
bool mIsFixInput
fix wurde gedrueckt, jetzt wird auf Ziffer gewartet
Definition: calc_sci.h:54
static ComputerBase * mCompP
Zeiger auf Computer mit der Symboltabelle.
Definition: symbols.h:51
Schaltet Rechner in wissenschaftlichen Anzeigemodus (SCI).
Definition: calc_sci.h:449
Arcuscosinus-Funktion.
Definition: calc_sci.h:337
void setAngMode(AngMode am)
Setzt die Winkelmodus-Strings.
Definition: calc_sci.cpp:278
Sinus-Funktion.
Definition: calc_sci.h:304
Areatangens hyperbolicus.
Definition: calc_sci.h:627
Cosinus hyperbolicus.
Definition: calc_sci.h:594
void process()
Setzt Invers-Modus.
Definition: calc_sci.cpp:519
Schaltet Rechner in Bruchdarstellungsmodus.
Definition: calc_sci.h:472
void process()
Prozessiert alle Winkelfunktions-Symbole.
Definition: calc_sci.cpp:441
Areasinus hyperbolicus.
Definition: calc_sci.h:583
void process()
Verschiebt Dezimalpunkt der Anzeige so nach links, dass der Exponent ein Vielfaches von 3 ist.
Definition: calc_sci.cpp:677
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse um drei Stellen nach links.
Definition: calc_sci.h:545
double DegOrGraToRad(double ang) const
Wandelt einen Winkel von Neugrad oder Altgrad ins Bogenmass um.
Definition: calc_sci.cpp:478
ComputerSci()
Der Konstruktor fuegt der Symboltabelle die zusaetzlichen Symbole fuer wissenschaftliche Taschenrechn...
Definition: calc_sci.cpp:40
void setDspMode(DspMode dm)
Setzt die Display-Modus-Strings.
Definition: calc_sci.cpp:294
void process()
Verschiebt Dezimalpunkt der Anzeige so nach links, dass der Exponent ein Vielfaches von 3 ist.
Definition: calc_sci.cpp:665
Allgemeine Potenz.
Definition: calc_sci.h:163
string makeCompSciInfoStr()
Erzeugt String mit den wichtigen Member-Variablen.
Definition: calc_sci.cpp:206
Cosinus-Funktion.
Definition: calc_sci.h:326
bool mIsSciInput
sci wurde gedrueckt, jetzt wird auf Ziffer gewartet
Definition: calc_sci.h:55
Schaltet Rechner in Konstanten-Modus.
Definition: calc_sci.h:393
void process()
Setzt Konstanten-Modus.
Definition: calc_sci.cpp:545
void processCommon()
Prozessiert einen eingegebenen Operator.
Definition: symbols.cpp:255
Display fuer wissenschaftliche Taschenrechner.
Definition: calc_sci.h:95
Natuerlicher Logarithmus.
Definition: calc_sci.h:256
Klasse zum Rechnen mit Bruechen.
Definition: fraction.h:84
void addSciSymsToSymTab()
Funktion fuegt der Symboltabelle die zusaetzlichen Symbole fuer wissenschaftliche Taschenrechner hinz...
Definition: calc_sci.cpp:52
Basisklasse der Nicht-Winkelfunktionen.
Definition: symbols.h:252
void process()
Setzt Display-Modus auf SCI.
Definition: calc_sci.cpp:571
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
void process()
Setzt Display-Modus auf NRM.
Definition: calc_sci.cpp:556
virtual void handlePercent()
Prozentrechnung des Solar-Rechners:
Definition: calc_sci.h:79
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse.
Definition: calc_sci.h:504
virtual bool preProcess(string &in)
Funktion erlaubt es, ein Symbol vor der eigentlichen Verarbeitung zu veraendern.
Definition: calc_sci.cpp:106
Schaltet Bruchdarstellung wieder aus.
Definition: calc_sci.h:493
Schaltet Rechner in Rad-Modus (Kreis ist in 2 pi rad eingeteilt).
Definition: calc_sci.h:415
Kreiszahl pi.
Definition: calc_sci.h:152
static double root(double x, double y)
Berechnet x^(1/y).
Definition: util.cpp:1008
Die Klasse Number repraesentiert Zahlen.
Definition: number.h:48
bool mIsHyp
Hyperbolicus.
Definition: calc_sci.h:53
Schaltet Rechner in Neugrad-Modus (Kreis ist in 400 Neugrad eingeteilt).
Definition: calc_sci.h:426
Modulo-Operator.
Definition: calc_sci.h:187
Basisklasse fuer die Operatoren.
Definition: symbols.h:103
Basisklasse fuer alle Aktionen ("=", "%", ...).
Definition: symbols.h:277
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
Arcustangens-Funktion.
Definition: calc_sci.h:360
Tangens-Funktion.
Definition: calc_sci.h:348
Allgemeine Funktionen (Modul lib)
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
Bruchdarstellung: Fliesskomma, Bruch, gemischter Bruch.
Definition: calc_sci.h:47
Basisklassen fuer alle Taschenrechner (Modul base)
Allgemeine Wurzel.
Definition: calc_sci.h:175
static DisplayBase * mDsplP
Zeiger auf Display (f. wissenschftl. Rechner)
Definition: symbols.h:52
FrcMode
Anzeige: normal, exponential, Festkomma.
Definition: calc_sci.h:36
Basisklasse aller Displays.
Definition: calculator.h:189
Schaltet Rechner in Hyperbolicus-Modus.
Definition: calc_sci.h:382
Reziprokwert.
Definition: calc_sci.h:223
Zehnerlogarithmus.
Definition: calc_sci.h:278
Basisklasse fuer Zahlen.
Definition: symbols.h:73
Basisklasse fuer Winkelfunktionen.
Definition: calc_sci.h:289
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:689
Areacosinus hyperbolicus.
Definition: calc_sci.h:605
void setModesSci()
Setzt die Modus-Strings auf die eingestellten Werte.
Definition: calc_sci.cpp:260
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
DisplaySci(ComputerBase *cbP)
Initialisiert das Display.
Definition: calc_sci.cpp:231
void process()
Setzt Hyperbolikus-Modus.
Definition: calc_sci.cpp:532
Basisklasse aller Computer.
Definition: calculator.h:84
AngMode mAngMode
Modus RAD, DEG, GRA.
Definition: calc_sci.h:56
Schaltet Rechner in "normalen" Anzeigemodus (weder FIX noch SCI).
Definition: calc_sci.h:437
void process()
Verschiebt Dezimalpunkt der Anzeige um die Anzahl von Stellen, die im Parameter uebergeben wird.
Definition: calc_sci.cpp:622
bool mapHypSci(string &sym)
Ordnet einem Symbol dasjenige Symbol zu, das ihm im Hyperbolicus-Modus entspricht (sin -> sinh,...
Definition: calc_sci.cpp:159
Schaltet Rechner in Anzeigemodus "gemischter Bruch".
Definition: calc_sci.h:482
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse.
Definition: calc_sci.h:521
Schaltet Rechner in Invers-Modus.
Definition: calc_sci.h:371
Schaltet Rechner in Altgrad-Modus (Kreis ist in 360° eingeteilt).
Definition: calc_sci.h:404
void process()
Prozessiert das pi-Symbol. Pi wird berechnet und auf den Stack geworfen.
Definition: calc_sci.cpp:423
Verschiebt bei wissenschaftlicher Darstellung das Komma der Mantisse um drei Stellen nach rechts.
Definition: calc_sci.h:533
Number calcVal(const Number &a)
Berechnet den Reziprokwert der Zahl a.
Definition: calc_sci.cpp:397
Schaltet Rechner in Festkommamodus (FIX).
Definition: calc_sci.h:461
Arcussinus-Funktion.
Definition: calc_sci.h:315
Potenzen zur Basis 10.
Definition: calc_sci.h:267
Sinus hyperbolicus.
Definition: calc_sci.h:572
Kleinstes gemeinsames Vielfaches.
Definition: calc_sci.h:211
Groesster gemeinsamer Teiler.
Definition: calc_sci.h:199