@kazord "au bon vouloir de l'implémentation" car au détour de https://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html on peut lire: « The low-order digit shall be rounded in an implementation-defined manner. »
Notices by Romain Tartière 😈 (smortex@mamot.fr), page 5
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Tuesday, 11-Jun-2019 23:07:32 EDT
Romain Tartière 😈
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Tuesday, 11-Jun-2019 23:04:28 EDT
Romain Tartière 😈
@kazord
Moralité:
double value = ...;
double multiplier = pow(10, precision);
double res = round(value * multiplier) / multiplier;
printf("%.*f", precision, res); -
Romain Tartière 😈 (smortex@mamot.fr)'s status on Tuesday, 11-Jun-2019 23:03:31 EDT
Romain Tartière 😈
@kazord Bien, j'en suis venu à la même conclusion: printf(3) arrondie n'importe comment au bon vouloir de l'implémentation, et round(3) fait le boulot correctement.
En effet, 0.05 c'est pas un a×2^b (donc coup de chance, il s’arrondit à 0.1), 0.25 est est un (1×2^-2) est printf("%.1f", 0.25) retourne "0.2" qui est mathématiquement faux mais est cohérent avec ce qui a été vu ci-dessus.
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Sunday, 09-Jun-2019 21:18:24 EDT
Romain Tartière 😈
@Nervengift @tom Awesome! Do you have a .svg / .pdf for sharing this?
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Sunday, 09-Jun-2019 16:02:21 EDT
Romain Tartière 😈
@mhka I always wanted live-systems to rely on this kind of mechanism…
This way, you:
Boot on the live-cd / live-usb-stick;
Use the product, be happy, decide to keep it;
Run the installation process (which does what you show);
Remove the device you booted from to free the CD-ROM drive / USB port;
All work you did in the live system is *not* lost;
All customization you did in the live system is *not* lost;
No need to reboot. -
Romain Tartière 😈 (smortex@mamot.fr)'s status on Thursday, 06-Jun-2019 16:42:56 EDT
Romain Tartière 😈
@hirojin because we trend to remember them and are unable to invalidate our cache properly?
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Monday, 03-Jun-2019 09:19:33 EDT
Romain Tartière 😈
@kazord et puis, justement, 0.5 c'est 1 × 2^-1 🤔 😥
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Monday, 03-Jun-2019 09:09:46 EDT
Romain Tartière 😈
@kazord j'y ai pensé, mais roundf(3) arrondie comme espéré… Du coup je n'arrive pas a capter ce qui fait que dans un cas ça arrondie au dessus et dans un autre au dessous 😕
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Monday, 03-Jun-2019 08:55:10 EDT
Romain Tartière 😈
Of course:
printf("%.1f", 0.05);
outputs 0.1, not 0.0.
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Monday, 03-Jun-2019 08:52:54 EDT
Romain Tartière 😈
Fun with C:
printf("%.0f", 0.5);
outputs 0, not 1.
-
Philipp Buehler (doublep@bsd.network)'s status on Friday, 31-May-2019 10:37:41 EDT
Philipp Buehler
First hour in Glarus and just "finding" this.. https://twitter.com/alisaesage/status/1134400428899127296
-
R (reventlov@mastodon.social)'s status on Monday, 27-May-2019 07:27:28 EDT
R
@ashgan @bortzmeyer Après, un cloud, c'est quand même bien défini (par le NIST, entre autres, et ce depuis 2011: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-145.pdf )
Dire que n'importe quelle collection de serveurs sans mécanisme de partage de ressources et d'élasticité c'est un cloud, c'est avant tout une caricature.
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Saturday, 25-May-2019 17:27:22 EDT
Romain Tartière 😈
@jpmens @dch and I use #riemann on FreeBSD, which I think deserves more attention… I am thinking about preparing a talk on it in order to help it gain more visibility, but I don't really know the audience I should target, so maybe the ideas you have might help me in some way?
cc @faxmodem who also use Riemann (but not on *BSD AFAIK)
-
aurora (aurora@social.bau-ha.us)'s status on Saturday, 25-May-2019 10:00:57 EDT
aurora
things i like about old electronics: you open up the case, and there's an envelope glued to the inside that contains the complete schematics and calibration instructions. a bunch of companies did that until the early 80s, too bad it never really caught on and just stopped at some point.
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Friday, 24-May-2019 16:59:44 EDT
Romain Tartière 😈
@raichoo Found it! Thanks!
https://hub.darcs.net/raichoo/hikari/patch/0e6d64f247a02e5a425e5f81832087c5c517b0a8
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Wednesday, 15-May-2019 22:14:43 EDT
Romain Tartière 😈
Isn't `zpool status` supposed to show "(resilvering)" in front of the disk that I have just added to a pool?
I do have information about a resilver in progress in the header, but expected to see "(resilvering)" at the end of the line of the device (gpt/disk0) I added to the pool (using `zpool attach zroot gpt/disk1 gpt/disk0`).
I feel confused 🤔…
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Wednesday, 15-May-2019 15:21:07 EDT
Romain Tartière 😈
@saper Hehe, probably, but I am not a Java developer and was having difficulties finding the appropriate tools 😉
Some people helped and I finally found the problem in some C code that was not properly handling the communication with the clojure server, causing it to wait forever for the client to ACK before releasing memory…
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Wednesday, 15-May-2019 02:31:48 EDT
Romain Tartière 😈
Committed to the FreeBSD ports tree!
-
Matthias (xhr@mastodon.social)'s status on Tuesday, 14-May-2019 13:26:08 EDT
Matthias
And here we go. Next round of #CPU vulnerabilities:
#Zombieload, #RIDL and #Fallout
-
Romain Tartière 😈 (smortex@mamot.fr)'s status on Tuesday, 14-May-2019 13:59:56 EDT
Romain Tartière 😈
@hirojin Sure it affects us — in my case in a good way — but I was already a happy contributor before. I am just a bit happier now 🙃
Asynchronous communication helps a lot here to continue to contribute efficiently, and I guess that my move does not have any impact on the quantity of contribution I do.
Also, better living conditions (climate, location, people) are a good way to be globally 'happier".
So, maybe it would have been wise to leave earlier 😋