News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

A question about what are useful constants.

Started by hutch--, October 04, 2018, 02:56:42 PM

Previous topic - Next topic

hutch--

I have been adding extra capacity to the FP calculator I posted recently and among the additions are 4 constants that may be useful in general purpose calculations.

I know we have people here with extensive experience in mathematics like Ray, Rui and many others, I wonder if anyone can point me in the right direction.

So far I have included,

pi
euler
root2
golden

The constants are easy enough to get as there are many lists available but logic rather than maths is my area and I am not familiar with many maths constants so any useful suggestions for general purpose calculations would be welcome.

I don't have a real feel for maths and see it as a cipher and hold the view ALA Bertrand Russell that the foundation of mathematics is in logic. As far as my maths skills (apart from computers) I work on this theory.

Using 10 fingers (8 & 2 thumbs).

Eenie
Meanie (not blue meanies)
Miney
Moe (without Larry and Curley)
Catch whatever by the toe
Unless she squeals don't let her go
You ho ho ho.

Siekmanski

DEG_RAD      equ  0.01745329251994329547 ; = degree to radian = pi / 180°
RAD_DEG      equ 57.29577951308232286465 ; = radian to degree = 180° / pi

convert degrees to radians: Radians = Degrees * DEG_RAD

convert radians to degrees: Degrees = Radians * RAD_DEG
Creative coders use backward thinking techniques as a strategy.

RuiLoureiro

#2
Hi Hutch,
             I never need to know more than you already know. The calculators define only pi because they use functions e^x, sqr(x), etc. But a good idea was given by Siekmanski: converter factors.
I would say that you may try to implement a simple function as sqr(x)- i dont know if it is easy to you or easy to implement in your calculator.
My TheCalculator only uses 2 constants: pi and e. But we may get "e" typing "e" or e^1 because it does e^z (z is any complex number a+ib). It doesnt need converter factors because we may use functions sin or sind, cos or cosd, arcsin, arcsind, etc. And if we need we define typing a=180/pi or b=pi/180 and then we may use a or b.
I am answering now because i saw this topic now. I am sorry.

LATER: and thank you for your kind words :biggrin:



hutch--

Thanks Rui,

Most of the maths are very simple in the calculator, the difficult part was making an interface that displayed the symbols properly. There are a number of conversions that are worth having but it will require a different interface to do it and that would be a completely new app.