-
ForestMapper
hey :)
-
ForestMapper
hellooo everyone
-
ForestMapper
so I have a few questions about integrating PoW into javascript or python
-
ForestMapper
which is the most feasible and which is the most efficient?
-
ForestMapper
I want to be able to mine directly to RandomX pools either through NodeJS or python
-
moneromooo
Chcek whether python can set rounding mode on float operations.
-
moneromooo
If so, python will be faster.
-
moneromooo
most feasible depends on wich you're most familiar with already.
-
ForestMapper
I'm much more familiar with js, but if learning python will make it significantly more efficient I'm down to learn
-
ForestMapper
"Round() is a built-in function available with python. It will return you a float number that will be rounded to the decimal places which are given as input."
-
ForestMapper
Is that what I need? ^
-
Inge-
"With IEEE754-based platform (as most modern ones do, including x86, ARM, MIPS...), it's default mode "round to nearest, ties to even" is the only mode available in Python standard library. That is "provided" by standardized defaults and absense of library methods to change it. There are more languages that doesn't allow to change rounding mode - e.g. Java - so this isn't an isolated Python whim."
-
ForestMapper
What workarounds would there be
-
ForestMapper
Or should I stick to javascript?
-
moneromooo
Workaround (for both) is to implement float ops yourself. Lots of not fun.
-
ForestMapper
When you say float ops what exactly does that mean
-
ForestMapper
A float is just a number with decimals right? So I can round that in JS with (num).toFixed(decimals) right?
-
sech1
-
sech1
OpenCL doesn't have rounding modes too, so this is what I had to implement
-
ForestMapper
o.o
-
ForestMapper
What exactly would I need to implement tho
-
ForestMapper
I don't know what the goal is if JS has .toFixed() already?
-
moneromooo
Rounding *mode*. Like, in which direction to round depending on inputs.
-
moneromooo
ie, does 3.5 round to 3 or 4, etc.
-
ForestMapper
Oh, so JS has that built in right?
-
ForestMapper
I wouldn't have to custom code it?
-
moneromooo
I believe hyc said it doesn't have it a couple days ago.
-
moneromooo
Why was this used btw ? Does it use substantial circuitry ?
-
ForestMapper
What does that mean :/ I'm not rlly technical with this kinda stuff
-
moneromooo
Sorry, I was asking sech1.
-
sech1
js doesn't have rounding mode for FP arithmetic