To understand better, lets do some small divisions.
226918604445/7 = 32416943492.142857142857142857142857142857142857142857142857142857142857142857
1/7 = 0.14285714285714285714285714285714285714285714285714285714285714285714285714286
n/7 = 33083454067804627263877424288196545100810732651164258395030046611862331855525
226918604445/7 mod n =
33083454067804627263877424288196545100810732651164258395030046611894748799017 -
33083454067804627263877424288196545100810732651164258395030046611862331855525 =
32416943492
your example :
1754225779965324/7476542256 =
234630.62467914767042547161121802934139666286933910161264258091019876394583438
1/7476542256 =
0.00000000013375166831933438082075891633936081909573039401009439034995537648439 928779826
Now we subtract
234630.62467914767042547161121802934139666286933910161264258091019876394583438 -
0.00000000013375166831933438082075891633936081909573039401009439034995537648439 928779826 =
234630.624679147536673803291883648520637746529978282516912186900104373595879
It doesn't work this way, because you are not using mod n.
Besides the academic explanation by our friend, there are some tricks which you need to know about division.
E.g, if your key ends with an even number, you could get p+p/2 = p 1.5 by multiplying with this:
57896044618658097711785492504343953926418782139537452191302581570759080747170
But how can you figure out this? 0.6246791476704254716112
You need to know what produces the above fraction. However if you do this :
0.6246791476704254716112*10000000000000000000000
You'd end up with 6246791476704254716112, these are normal numbers but you can learn a lot from them ;
Lets see what that noob on second post did.
226918604445/7 =
32416943492.142857142857142857142857142857142857142857142857142857142857142857
What if we now multiply
32416943492.142857142857142857142857142857142857142857142857142857142857142857
*2 =
64833886984.285714285714285714285714285714285714285714285714285714285714285714
* by 3 =
97250830476.428571428571428571428571428571428571428571428571428571428571428571
* by 4 =
129667773968.57142857142857142857142857142857142857142857142857142857142857143
*by 5 =
162084717460.71428571428571428571428571428571428571428571428571428571428571429
* by 6 =
194501660952.85714285714285714285714285714285714285714285714285714285714285714
You will get an idea about what's happening once you do this and compare all the results.
When you are dividing, you'd want to use powers, to land on the closest number to your target.
Operating mod n, means your n is the limit of your world's mathematics, what that really means, n is not changing, it's a fixed value and you can find it's weak spots.
Since you're dividing two scalar numbers inside a Galois field, the division can be converted from x/y to x*y(^-1) [mod n, of course], following a basic law of division.
y^-1 inside a Galois field is equal to y^(n-2) [Not to the power of n-1 as you might think, because that evaluates to 1.
Fermat's little theorem says y^n = y^1 = y.]
As you can see, the division has now been reduced to a modular exponentiation and a multiplication, which can be calculated by common tools.
There is no fractional part in finite field numbers, so we use this technique to do the division according to how it's supposed to be done in a field - as opposed to in the real number system.
I am looking for the representation of the floating numbers with respect to ecc, not how to extract the integer part.
example:
3/2= 1.5
where in ecc they are:
0.5=
57896044618658097711785492504343953926418782139537452191302581570759080747169
1.5= 57896044618658097711785492504343953926418782139537452191302581570759080747169 +1
2.5= 57896044618658097711785492504343953926418782139537452191302581570759080747169 +2
and so on.
I'm looking for how to calculate the equivalent of, for example, 23564.74256 in integer according to ECC.
because if I divide 1/10
is 0.1
028c6154856794fcd5ee79ba8c96b7dd980e289a6b93a52d50dbdb9388a4c75604
If I continue adding 0.1
0.2
03a3c9d9de2ba89d61c63af260be9759d752b8bfef56ee41b2dab2b99871af38a8
0.3
029b5d98e8ace287628d177ab6d47c6ae6e04a8858481582fd10a49baf4d066b4f
0.4
0337cd64f554a8a26e59fbffd50a0aa11a786012d3be0c3e085eb767afa2695716
0.5
020000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
0.6
0373414b5a15b55e859fc431a1a10dea18d829756d72cf2d70f5f26828e9965941
0.7
0373a5fb8e463a44348c3880a5e293646538e781cb201df39686ff33e073170363
0.8
033ff4953a91e46f3683c63d28c5100f3e8f78417ccc6567a217ef9ea6ca922729
0.9
0371cfb1ec28c77d72ba879acc074ffb775f7c6e54482975e1e8be62d54adbdaef
10
0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
How will you see you can represent a number with floats in ecc.
but when there are many decimals it gets complicated.
0.864326889 ??