@@ -406,29 +406,29 @@ let caml_int64_format fmt x =
406
406
ref (Int64. add quotient_l c ) in
407
407
let modulus = ref d in
408
408
s :=
409
- Bs_string. string_of_char
409
+ Bs_string. of_char
410
410
cvtbl.[ Int64. to_int ! modulus] ^ ! s ;
411
411
412
412
while ! quotient <> 0L do
413
413
let a, b = Js_int64. div_mod (! quotient) wbase in
414
414
quotient := a;
415
415
modulus := b;
416
- s := Bs_string. string_of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
416
+ s := Bs_string. of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
417
417
done ;
418
418
end
419
419
else
420
420
let a, b = Js_int64. div_mod x wbase in
421
421
let quotient = ref a in
422
422
let modulus = ref b in
423
423
s :=
424
- Bs_string. string_of_char
424
+ Bs_string. of_char
425
425
cvtbl.[ Int64. to_int ! modulus] ^ ! s ;
426
426
427
427
while ! quotient <> 0L do
428
428
let a, b = Js_int64. div_mod (! quotient) wbase in
429
429
quotient := a;
430
430
modulus := b;
431
- s := Bs_string. string_of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
431
+ s := Bs_string. of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
432
432
done
433
433
434
434
| Dec ->
@@ -454,29 +454,29 @@ let caml_int64_format fmt x =
454
454
e) in
455
455
let modulus = ref f in
456
456
s :=
457
- Bs_string. string_of_char
457
+ Bs_string. of_char
458
458
cvtbl.[Int64. to_int ! modulus] ^ ! s ;
459
459
460
460
while ! quotient <> 0L do
461
461
let a, b = Js_int64. div_mod (! quotient) wbase in
462
462
quotient := a;
463
463
modulus := b;
464
- s := Bs_string. string_of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
464
+ s := Bs_string. of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
465
465
done ;
466
466
467
467
else
468
468
let a, b = Js_int64. div_mod x wbase in
469
469
let quotient = ref a in
470
470
let modulus = ref b in
471
471
s :=
472
- Bs_string. string_of_char
472
+ Bs_string. of_char
473
473
cvtbl.[ Int64. to_int ! modulus] ^ ! s ;
474
474
475
475
while ! quotient <> 0L do
476
476
let a, b = Js_int64. div_mod (! quotient) wbase in
477
477
quotient := a;
478
478
modulus := b;
479
- s := Bs_string. string_of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
479
+ s := Bs_string. of_char cvtbl.[Int64. to_int ! modulus] ^ ! s ;
480
480
done ;
481
481
end ;
482
482
if f.prec > = 0 then
@@ -531,7 +531,7 @@ let caml_format_float fmt x =
531
531
let prec = if prec <> 0 then prec else 1 in
532
532
s := Js_float. to_exponential x (prec - 1 );
533
533
let j = Bs_string. index_of ! s " e" in
534
- let exp = Js_int. from_any @@ Bs_string. slice_rest ! s (j + 1 ) in
534
+ let exp = int_of_float @@ Js_float. of_any @@ Bs_string. slice_rest ! s (j + 1 ) in
535
535
if exp < - 4 || x > = 1e21 || Bs_string. length (Js_float. toFixed x 0 ) > prec then
536
536
let i = ref (j - 1 ) in
537
537
while ! s.[! i] = '0' do
0 commit comments