Bitcoin Forum
August 29, 2026, 04:05:54 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: How does merit approximation work  (Read 253 times)
TryNinja
Legendary
*
Offline

Activity: 3668
Merit: 10949


@ List of no-KYC websites: https://bitlist.co


View Profile WWW
May 27, 2026, 09:00:38 PM
 #21

You probably tried more than 16 9s. Not sure how it's implemented, but somehow it detects it as a float and triggers a floating precision error..
I did some little research and found out PHP uses the IEEE 754 double-precision standard.

"PHP typically uses the IEEE 754 double precision format, which will give a maximum relative error due to rounding in the order of 1.11e-16." - Source.

So once you crossed the maximum limit slot for the "Significand precision [53 bits (52 explicitly stored)].. approximately 16 decimal digits", it means it runs out of space and rounds to the nearest binary fraction from the way I understand it.

Source: https://en.wikipedia.org/wiki/Double-precision_floating-point_format
That could be it.

0.9999999999999999999 or something like this worked for 1 merit (I just spammed 9's and couldn't see how many). Grin

Mistery solved?

Thanks for the fun enigma @Ambatman Cheesy

 
 b1exch.to 
  ETH      DAI   
  BTC      LTC   
  USDT     XMR    
.███████████▄▀▄▀
█████████▄█▄▀
███████████
███████▄█▀
█▀█
▄▄▀░░██▄▄
▄▀██▄▀█████▄
██▄▀░▄██████
███████░█████
█░████░█████████
█░█░█░████░█████
█░█░█░██░█████
▀▀▀▄█▄████▀▀▀
fillippone
Legendary
*
Online Online

Activity: 2996
Merit: 21363


Duelbits.com - Rewarding, beyond limits.


View Profile WWW
May 27, 2026, 09:31:19 PM
 #22

The answer is probably relating to the fact 0.999(9)=1
This is not rounding, it is an identity.
When the number of 9 goes beyond the precision, it becomes 1.

Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!