Expm1 - Exp(raqam) - 1ni qaytaradi, natijada raqam nolga yaqin bo'lsa ham aniq bo'ladi.
echo(expm1(0) . "
");
echo(expm1(1) . "
");
echo(expm1(10) . "
");
echo(expm1(4.8));
?>
0 1.718281828459 22025.465794807 120.51041751873
Fdiv – IEEE754 asosida sonlarni bo’ladi - fdiv(float $num1, float $num2): float
Floor – kichik tomonga qarab yaxlitlaydi - floor(int|float $num): float
Fmod - Moduli bo'linishning kasr qoldig'ini qaytaradi - fmod(float $num1, float $num2): float
Hexdec – 16likdan 10 likka - hexdec(string $hex_string): int|float
Hypot - To'g'ri burchakli uchburchakning gipotenuzasi uzunligini hisoblaydi - hypot(float $x, float $y): float
Intdiv – bo’lganda butun sonni qaytaradi - intdiv(int $num1, int $num2): int
- is_finite(float $num): bool
Is_infinite - Qiymat cheksiz yoki yo'qligini tekshiradi - is_infinite(float $num): bool
-
Is-nan - Qiymat "raqam emas" yoki yo'qligini tekshiradi
Log10 – 10lik logarifm Log1p -Raqam nolga yaqin bo'lsa ham natija aniq bo'lishi uchun hisoblangan jurnalni (1 + raqam) qaytaradi - log(float $num, float $base = M_E): float
Max- sonning eng kattasini qaytaradi Min – sonning eng minimumini qaytaradi
mt_getrandmax - Tasodifiy sonning mumkin bo'lgan maksimal qiymatini ko'rsatadi
Mt_rand - Mersenne Vortex asosidagi tub sonlar generatori usuli yordamida tasodifiy qiymat hosil qiladi - mt_rand(int $min, int $max): int
-
mt_srand - Mersenne Vortex asosida tasodifiy sonlar generatorini ishga tushiradi - mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void
Octdec- 8 likdan 10 likka - octdec(string $octal_string): int|float
-
Pi – pi sonini qaytaradi Pow – darajaga ko’tarish - pow(mixed $num, mixed $exponent): int|float|object
Rad2deg radiandan gradusga o’tkazish - rad2deg(float $num): float
-
- rand(int $min, int $max): int
- rand(): int
Round – sonni yaxlitlash - round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float
Sin -sinus
Sinh- giperbolik sinus Srand - Pseudo-tasodifiy raqamlar generatorining bosh raqamini o'zgartiradi - srand(int $seed = 0, int $mode = MT_RAND_MT19937): void
Tan -tangens Tanh – giperbolik tangens
$b) echo "a katta b dan"; ?>
$b) { echo "a katta b dan"; $b = $a; } ?>
If else
$b) { echo "a katta, b dan"; } else { echo "a kichik, b dan"; } ?>
Elseif else if
$b) { echo "a katta, b dan"; } elseif ($a == $b) { echo "a teng b ga"; } else { echo "a kichik, b dan"; } ?>
$b): echo $a." katta, ".$b; else if($a == $b): // Kompilyatsiya qilmaydi. echo " Yuqoridagi chiziq halokatli xatoga olib keladi.";
else {
echo “xatolik”;
} endif; /* to’g’ri yo’l: */ if($a > $b): echo $a." katta, ".$b; elseif($a == $b): //E'tibor bering, faqat bitta so'z bor. echo $a." teng ".$b; else: echo $a." katta va teng emas ".$b; endif; ?>
alternativlari
A teng 5
Swtich case tanlash operatori
Swtich case
Switch case
switch ($i): case 0: echo "i teng 0"; break; case 1: echo "i teng 1"; break; case 2: echo "i teng2"; break; default: echo "i teng emas 0, 1 yoki 2 ga"; endswitch; ?>
Do'stlaringiz bilan baham: |