Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline jtm2020hyo  
#1 Posted : 06 April 2021 13:43:38(UTC)
jtm2020hyo

Rank: Newbie

Groups: Registered
Joined: 04/04/2021(UTC)
Posts: 9
Peru

Was thanked: 1 time(s) in 1 post(s)
how can I do an arithmetic operation using a different base to 10?

I did not find anything related to this anywhere.
Offline Jean Giraud  
#2 Posted : 06 April 2021 15:32:41(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 5,254
Canada

Was thanked: 825 time(s) in 656 post(s)
Originally Posted by: jtm2020hyo Go to Quoted Post
how can I do an arithmetic operation using a different base to 10 ?

Can you be more specific with an example ?

Offline jtm2020hyo  
#3 Posted : 06 April 2021 16:01:46(UTC)
jtm2020hyo

Rank: Newbie

Groups: Registered
Joined: 04/04/2021(UTC)
Posts: 9
Peru

Was thanked: 1 time(s) in 1 post(s)
For example, for binaries:

2 in base 10 = 2

2 in base 2 = 10 ( base 2)

2 in base + 2 in base 2 = 100 (base 2)

4 in base 10 = 100 in base 2

Base is wrote like a number subscripted
Offline overlord  
#4 Posted : 06 April 2021 16:10:01(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 252
Turkey

Was thanked: 69 time(s) in 50 post(s)
Originally Posted by: jtm2020hyo Go to Quoted Post
For example, for binaries:

2 in base 10 = 2

2 in base 2 = 10 ( base 2)

2 in base + 2 in base 2 = 100 (base 2)

4 in base 10 = 100 in base 2

Base is wrote like a number subscripted

If I am not mistaken, there are no such base arithmetic functions under SMath.
You can write your own functions under SMath, but I guess it would take a lot of time.
Hmm, maybe this is a nice idea to write a plugin about.
I could do that as a side project in my spare times.
No promises here.


Regards.

Edited by user 06 April 2021 16:11:56(UTC)  | Reason: Not specified

Offline Jean Giraud  
#5 Posted : 06 April 2021 17:59:46(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 5,254
Canada

Was thanked: 825 time(s) in 656 post(s)
Originally Posted by: jtm2020hyo Go to Quoted Post
how can I do an arithmetic operation using a different base to 10 ?

I don't understand, simply.
I you have a parametric function from source f(a,b,c,x)
parameters [a,b,c] given from source as decimal,
why would you convert in another base than decimal ?
However, you can shrink/expand the variate 'x' as you wish.

Otherwise.PNG

Offline Razonar  
#6 Posted : 06 April 2021 20:07:51(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 687
Uruguay

Was thanked: 355 time(s) in 231 post(s)
Originally Posted by: jtm2020hyo Go to Quoted Post
how can I do an arithmetic operation using a different base to 10?

I did not find anything related to this anywhere.


Hi. Try this one: https://en.smath.com/for...nversions.aspx#post60016

Or this other: https://en.smath.com/for...12_String-utilities.aspx

Best regards.
Alvaro.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.