Author

Topic: How to limit the number of decimal numbers obtained during calculation and used? (Read 180 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
You are getting implementation-dependent garbage numbers. It is hard to say how to get those numbers, because without code, we have no idea, where you made a mistake in your own code.

But I guess it is related to float precision. Maybe check basic things, for example that adding 0.1 ten times gives you exactly 1.

There's even website about it at https://0.30000000000000004.com/.

I don't know modmath / keymath

OP might be referring to this repository, https://github.com/albertobsd/ecctools.
member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
You are getting implementation-dependent garbage numbers. It is hard to say how to get those numbers, because without code, we have no idea, where you made a mistake in your own code.

But I guess it is related to float precision. Maybe check basic things, for example that adding 0.1 ten times gives you exactly 1.

68140381134624198284233778684484 this is a priv puzzle 110 in dec, this is a 2^110 range - 1298074214633706907132624082305024.

member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
Why do you even have decimals? You mention scalar and publickey and this is a bitcoin board so you must be working with modular arithmetic where you should only deal with integers (numbers without decimals or fractions).

But, secp256  curve think anower, divide 68140381134624198284233778684484 this priv to 1298074214633706907132624082305024 you get float coded in hex !

You can convert decimail geted in not mod calc and get back privkey.

And publick key math operation and pablick key are same, is simple use then you have all pub's or priv's, privs or pabs and vs.You can multiply privs, and get pubs from result * base poit, or use pab and multiply to priv ang get pubkey what will be same.
legendary
Activity: 3472
Merit: 10611
Why do you even have decimals? You mention scalar and publickey and this is a bitcoin board so you must be working with modular arithmetic where you should only deal with integers (numbers without decimals or fractions).
copper member
Activity: 821
Merit: 1992
You are getting implementation-dependent garbage numbers. It is hard to say how to get those numbers, because without code, we have no idea, where you made a mistake in your own code.

But I guess it is related to float precision. Maybe check basic things, for example that adding 0.1 ten times gives you exactly 1.
member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
Example: 0x35c0d7234df7deb0f20cf7062444) / 2**110) ) * 10000000000000000 = 8398950428744437 (does someone uderstand why  I need this and how to use it  Huh

This is not mod calculus.

(0.8398950428744437*2**110) - 0x35c0d7234df7deb0f20cf7062444 = 0

So, if someone show how to hack tjis shit, it can be good !

So, Lets power on our brains !!!
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
Actually 777/999 is just 7/9. There is no non-infinite decimal representation of it.

If you plug it into a calculator, due to rounding, it gives the same result if you multiply 0.7777*999 or 0.777777777777777*999, but to be exact, both shouldn't give you the exact number 777.

I don't know modmath / keymath, but depending on what you have to do and what tools it gives you, you might be able to just round to X decimal places. Or calculate with proper decimal fractions instead of decimal numbers.

999 is a scalar, 777 is a publick key, how to get first 20 digits of 0.77777777....inf ? What is posible to do somethink with 0.77777777....inf pubkey, to get pubkey only from 20 first digits of 0.77777777....inf ?
Again, I don't know if your software / programming language / whatever allows to truncate or round to a certain amount of decimal places, but be aware that if you do, the result becomes mathematically wrong / inaccurate. You do need all the infinite decimal places to accurately describe a division of 9 (and other periodic numbers) if you don't want to use a proper decimal fraction (like '7 over 9').
member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
Actually 777/999 is just 7/9. There is no non-infinite decimal representation of it.

If you plug it into a calculator, due to rounding, it gives the same result if you multiply 0.7777*999 or 0.777777777777777*999, but to be exact, both shouldn't give you the exact number 777.

I don't know modmath / keymath, but depending on what you have to do and what tools it gives you, you might be able to just round to X decimal places. Or calculate with proper decimal fractions instead of decimal numbers.

999 is a scalar, 777 is a publick key, how to get first 20 digits of 0.77777777....inf ? What is posible to do somethink with 0.77777777....inf pubkey, to get pubkey only from 20 first digits of 0.77777777....inf ?

Thx.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
Actually 777/999 is just 7/9. There is no non-infinite decimal representation of it.

If you plug it into a calculator, due to rounding, it gives the same result if you multiply 0.7777*999 or 0.777777777777777*999, but to be exact, both shouldn't give you the exact number 777.

I don't know modmath / keymath, but depending on what you have to do and what tools it gives you, you might be able to just round to X decimal places. Or calculate with proper decimal fractions instead of decimal numbers.
member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
How to limit the number of decimal numbers obtained during calculation and used in calculations ?

Good day.

Then I use keymath and modmath and devide for deviding for example 777 / 999 = 0.77777777777777777....7 inf. modmath and keymath genererate result not with minimum needed float numbers 0.77777777777777777(This will be named X) * 999 = 777.0, but with maximum nposible float number - 0.77777777777777777777777777777777777777777777777777777777777777777777777777777 7777777777777777777777777777777777777777777777777777777777777777 ........7 (this will be named Y) * 999 = 777.0 and private / publick keys for X and Y are different !!!

How to use in calculus editable floats count in result ?


0.77777777777777777 * 999 = 777


0.77777777777777777777777777777777777777777777777777777777777777777777777777777 7777777777777777777777777777777777777777777777777777777777777777 * 999 = 777


0.77777777777777777777777777777777777777777777777777777777777777777777777777777 7777777777777777777777777777777777777777777777777777777777777777 - THIS IS TOO MANY, HOW TO MODIFY MODMATH AND KEYMATH USE THIS - 0.77777777777777777
 RESULT OF THEIR CALCULATION

help plesse ?

Jump to: