Why different behaviors on Safari desktop / iphone and when application is added on Iphone desktop?

Why different behaviors on Safari desktop / iphone and when application is added on Iphone desktop?

Hello !
Could someone tell me why I have different behaviors on Safari desktop / iphone and when application is added on Iphone desktop?
In my application I perform a calculation to adapt one value to be displayed:
  1. var Cal = 101;       /* (value normally retrieved from my db) */
  2. var  G_DepEnerg = 2938.52 ;
  3. var PcCal = (Cal / (G_DepEnerg / 100));
  4. var NumPCal = Math.round10(PcCal, -1); /* Using https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Math/round#Utiliser_Math.round()*/
  5. var TxtNumPCal = (NumPCal + "%");
  6. $("#ValCalPc").html(TxtNumPCal); 
  7. var PcCalComplet = "<span style='width:" + NumPCal + "%;'></span>";
witch works fine on desktop and iPhone (Safari) !!

but when I add the app from safari by "Add on screen" "+button in safari" and run it , result is:


????