php / php/php-src

bcmath functions to support scientific notation numbers

Offen
#17,876 3 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@SakiTakamachi arbeitet bereits daran.

Seit 22.2.2025.

Extension: bcmath Feature Status: Requires RFC
Vorherrschende Sprache
C
Sterne
40.4k
Forks
8.1k
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
96

Beschreibung

Description

I occurred a problem with bcmath functions, bcadd, bcround specifically, where they do not support scientific notation numbers, for example 2.3314683517128E-14.

A solution that I found online was to use as bcround(sprintf("%.20f", (float)$rest['nett']), 9), but it is a bit hard to do that everywhere.

Wouldn't it be more logical for bc* functions to support 2.3314683517128E-14 since they support 0.0000000000000023314683517128 for example

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.