脑瘤是什么原因引起的| 什么的蚂蚁| 7月15日什么星座| 什么的眨眼| 用什么洗头白发能变黑| 脚底发麻是什么原因| 375是什么意思| 尿酸高吃什么食物好| 狗可以吃什么| 乳房长什么样| 医者仁心什么意思| 长寿花什么时候开花| 谢谢谬赞是什么意思| 来大姨妈前有什么症状| 脚上有水泡是什么原因| 锦纶是什么面料优缺点| 慢性咽炎挂什么科| 舌苔白腻吃什么药| 子宫内膜炎是什么原因造成的| 蛇鼠一窝什么意思| 北京的区长是什么级别| 6.16是什么星座| 女儿是小棉袄儿子是什么| icu是什么意思| 梦见换房子是什么预兆| 盐水是什么| 脸上长斑是因为什么原因引起的| 肺气不足有什么症状| 什么情况下需要做活检| ppl是什么意思| 检查血液挂什么科| 双向什么意思| 临床路径是什么意思| 高碎是什么茶| 鼻塞吃什么药| usc是什么意思| 在什么位置| 妗子是什么意思| 合菜是什么| 心口窝疼挂什么科| 老枞水仙属于什么茶| 什么粥最养胃健脾| 女性体毛多是什么原因| 为什么老虎头上有王字| 杀虫剂中毒有什么症状| 囊性灶什么意思| 女人小便带血是什么原因引起的| Zucchini是什么意思| cbd什么意思| 房性心动过速是什么意思| 猪头肉是什么意思| coach是什么意思| 隽读什么| 1为什么读yao| 白斑是什么病| 正常人为什么传导阻滞| 苹果和生姜煮水喝有什么功效| 悔教夫婿觅封侯是什么意思| 喝茶为什么睡不着觉| 为什么会长黑痣| 恶心是什么意思| 甲状腺功能挂什么科| mic是什么意思| 肺部检查挂什么科| 改户口需要什么手续| 木乃伊是什么| 早泄是什么症状| 乳房长什么样| 2022年是什么生肖年| 皮肤病挂什么科| 小美女是什么意思| 深静脉血栓有什么症状| 二聚体是什么| 勾引什么意思| 灏读什么| 美篇是什么| 四点半是什么时辰| ur是什么意思| 女生补气血吃什么好| 冬枣不能和什么一起吃| 老年人贫血吃什么补血最快最有效| 电脑长期不关机有什么影响| 晚上难以入睡是什么原因| 但求无愧于心上句是什么| 什么叫全日制本科| 凉白开是什么水| 潮喷是什么意思| 你想要什么我都会给| 包二奶什么意思| 专班是什么意思| 什么时候测血压最准确| 嗜碱性粒细胞偏高是什么原因| 高铁不能带什么| 内瘘是什么意思| 恋爱是什么感觉| 虾虎鱼吃什么| 药流之后需要注意什么| 什么是尊严| 火龙果什么季节成熟| 音什么笑什么成语| 冠冕是什么意思| 吃什么降血脂最好| 弯刀裤适合什么人穿| 蜥蜴吃什么| 一个虫一个离念什么| 颈椎病用什么药膏| rp是什么意思| 肛门痒是什么原因男性| 它是什么结构| 鬼畜什么意思| 亚专业是什么意思| 人中浅的女人代表什么| 偏头痛不能吃什么食物| 粉红粉红的什么| 椴树是什么树| 9点到11点是什么经络| 9月24号什么星座| 七月二十二什么日子| 五月二十一是什么星座| 眼睛散光是什么症状| 月经稀发是什么意思| 什么的天空飘着什么的白云| 脚底板脱皮是什么原因| 吃什么能治脂肪肝| 狗为什么不死在家里| X-Ray什么意思| 老公护着婆婆说明什么| 4月6号什么星座| 葡萄胎是什么意思| 什么是射线| 针眼用什么药| 女性外阴瘙痒用什么药| 子宫内膜厚有什么症状| 扫把和什么是一套的| 麦粒肿是什么原因引起的| 脑梗需要注意什么| 乐哉是什么意思| 为什么会宫寒| 痔疮出血吃什么药| 西红柿含什么维生素| 有恃无恐什么意思啊| 菊花代表什么象征意义| 上海为什么叫上海| 成都市市长是什么级别| 扫把星什么意思| 手链突然断了预示什么| 视网膜脱落有什么症状| 检查是否怀孕要做什么检查| 1104是什么星座| 甲减喝什么药| 麻油是什么| 瑀字五行属什么| 房速与房颤有什么区别| 百合花代表什么| 木耳吃多了有什么坏处| 小肚子胀气是什么原因| 圆脸适合什么发型女| amass是什么牌子| 肿物是什么意思| 什么是铅| 灵柩是什么意思| 什么花适合送老师| 花千骨什么时候上映的| 喝酒不能吃什么药| 荨麻疹能吃什么水果| 生活质量是什么意思| 什么是感情| 吃叶酸有什么好处| 吐舌头是什么意思| 干咳是什么原因| 肠易激综合征是什么病| 指甲月牙代表什么意思| 什么东西最刮油减肥| 阴阳调和是什么意思| 谢霆锋什么学历| 为什么不建议做融合手术| 清洁度111是什么意思| 肱骨头小囊变什么意思| 恐龙是什么时候灭绝的| 太阳出来我爬山坡是什么歌| 利水渗湿是什么意思| 孕妇吃什么鱼最好| 什么是脱敏治疗| 老炮儿是什么意思啊| 怕金森是什么症状| 窦性心律是什么意思| 正司级是什么级别| 扁桃体发炎吃什么药效果好| 牛黄安宫丸什么时候吃最好| 丑未戌三刑 会发生什么| 办健康证要带什么证件| 唾液腺是什么组织| 喉咙痛去药店买什么药| 吃火龙果有什么好处和坏处| 免疫组化是什么| 脚肿是什么原因| 单男是什么意思| 全血低切相对指数偏高什么意思| 年轻人白头发是什么原因引起的| 牙疼吃什么药效果好| fr是什么| 胰腺炎吃什么中成药| 血管瘤是什么原因引起的| 南瓜为什么叫南瓜| 酵母菌是什么| 金蝉脱壳是什么意思| c13呼气试验阳性是什么意思| 台风是什么意思| 李知恩为什么叫iu| 肝郁是什么意思| 叶黄素是什么东西| 固涩是什么意思| 小排畸主要检查什么| 可心是什么意思| 病毒性肺炎吃什么药| 什么是汉服| 奉献是什么意思| 角的大小和什么有关| 湿气重会有什么症状| 择日不如撞日什么意思| 水冲脉见于什么病| 物心念什么| 补肾吃什么食物| 挖苦是什么意思| 人不出汗是什么原因| 精液什么颜色正常| 女娲补天是什么生肖| 勋章是什么意思| 负罪感什么意思| 好运连绵是什么意思| 耳石症有什么症状| 耳鸣是什么引起的| 白蚁长什么样| 朋友生日送什么礼物好| 胃潴留是什么意思| 增肌吃什么| 艾滋病简称什么| 金樱子配什么才壮阳| 4月10号什么星座| 一饿就心慌是什么原因引起的| 口腔溃疡吃什么好的快| 六月十七是什么星座| 星月菩提五行属什么| 尘肺病用什么药最好| p波增宽什么意思| 射手座是什么象星座| 多此一举是什么生肖| 白月光是什么意思| 同型半胱氨酸偏高吃什么药| 背疼应该挂什么科| 皮脂腺囊肿看什么科| 料酒是什么| 天机不可泄露是什么意思| 什么的小球| 碳水化合物指的是什么食物| 一意孤行是什么意思| 烟花三月是什么意思| 什么是比| 旗开得胜是什么意思| 玻璃瓶属于什么垃圾| 腋下出汗有异味是什么原因| 西红柿什么时候成熟| 什么是抗生素| 肚脐下三寸是什么位置| 百度
rfc:adding_bcround_bcfloor_bcceil_to_bcmath

智慧路灯搭载5G微基站 滨海新区将进入5G时代

Introduction

百度 短期来看,标荒虽然会较年初缓和,但是仍会面临很大的恢复压力。

As you know, BCMath is an arbitrary precision mathematical function that supports exact calculations. As of the writing of this RFC, nine calculation functions exist, but no equivalents exist for round, floor, and ceil. Considering the role of BCMath, supporting features like these is important.

Proposal

This RFC proposes to introduce three new functions to BCMath: bcround(), bcfloor(), and bcceil(). It is assumed that the usage will be the same as round(), floor(), and ceil(), except that the value passed to the argument and the return value will be of string type.

var_dump(bcround('0.285', 2, PHP_ROUND_HALF_UP));
// string(4) "0.29"

var_dump(bcfloor('13.0915'));
// string(2) "13"

var_dump(bcceil('24.00001'));
// string(2) "25"

Since it is an arbitrary precision calculation, there is no need to consider the maximum value of int or double.

var_dump(bcround('0.12345678901234567890123456789', 28));
// string(30) "0.1234567890123456789012345679"

var_dump(bcfloor('123456789012345678901234567890.5'));
// string(30) "123456789012345678901234567890"

var_dump(bcceil('123456789012345678901234567890.5'));
// string(30) "123456789012345678901234567891"

Round mode constant

Similar to round(), we can specify how edge cases are handled using mode. I plan to use the constants for round() included in standard ext as they are. The reason for reusing standard ext constants is as follows.

  • standard ext is installed by default
  • It is not a constant that expresses a complex concept enough to prepare a new constant for BCMath
  • Having multiple similar constants is unfriendly
  • These constants do not change frequently, and reusing them does not impede maintenance

Ignore BCMath scale

BCMath allows you to specify the scale of calculation results. You can pass values ??to arguments on a per-function basis, or you can set default values ??for BCMath and omit arguments.

Due to their nature, there is no point in setting the scale of the three functions proposed this time. Therefore, these functions ignore scale settings both semantically and implementationally.

You might think that it can be used to specify the precision of round, but scale does not accept negative values. This cannot be used because precision must accept negative values.

Backward Incompatible Changes

These are new features and do not break existing functionality.

If I had to point out my concerns, I would say that code that satisfies the following conditions will cause an error to occur.

  • A situation where the user has defined a function with the same name, such as bcround()
  • And, the existence of the function is not checked in advance.

However, I do not think it is necessary to consider these matters.

Proposed PHP Version(s)

next PHP 8.x (Probably 8.4)

RFC Impact

To SAPIs

None.

To Existing Extensions

Only BCMath is affected.

To Opcache

No impact.

New Constants

None.

php.ini Defaults

None.

Open Issues

None.

Unaffected PHP Functionality

There is no effect on anything other than BCMath.

Future Scope

None.

Proposed Voting Choices

As per the voting RFC a yes/no vote with a 2/3 majority is needed for this proposal to be accepted. Voting started on 2025-08-08 and will end on 2025-08-08 00:00 GMT.

Adding bcround, bcfloor and bcceil to BCMath
Real name Yes No
alec (alec)  
ashnazg (ashnazg)  
cpriest (cpriest)  
crell (crell)  
galvao (galvao)  
girgias (girgias)  
mbeccati (mbeccati)  
nicolasgrekas (nicolasgrekas)  
nielsdos (nielsdos)  
ocramius (ocramius)  
petk (petk)  
santiagolizardo (santiagolizardo)  
sergey (sergey)  
Final result: 13 0
This poll has been closed.

Patches and Tests

I am currently creating a prototype.

Implementation

Rejected Features

None.

References

Changelog

  • 0.1.0: created rfc
rfc/adding_bcround_bcfloor_bcceil_to_bcmath.txt · Last modified: by 127.0.0.1

?
mews评分是什么意思 什么是静脉血栓 人尽可夫是什么意思 布拉吉是什么 时至今日是什么意思
阳历是什么 明朝前面是什么朝代 心口疼挂什么科 鱼鳔是什么 细胞器是什么
1.25什么星座 送男生什么生日礼物 gel是什么意思 胃酸胃胀吃什么药 岁寒三友是指什么
支抗钉是什么 九华山在什么地方 头疼是什么病的前兆 momax是什么牌子 心脏检查挂什么科
什么食物补血clwhiglsz.com 3岁宝宝流鼻血是什么原因hcv7jop4ns8r.cn 狗狗产后吃什么下奶多hcv9jop6ns8r.cn 那悲歌总会在梦中惊醒是什么歌hlguo.com 微醺是什么状态hcv8jop3ns1r.cn
检查乳腺挂什么科hcv8jop1ns6r.cn 尿酸高去医院挂什么科hcv7jop5ns5r.cn 黑曼巴是什么意思hcv8jop6ns3r.cn 梦到蜈蚣是什么意思hcv9jop6ns8r.cn 吃什么皮肤白的最快hcv9jop5ns2r.cn
吃榴莲有什么好处和坏处hcv8jop4ns1r.cn 羊肉馅饺子放什么菜hcv8jop9ns4r.cn 线性骨折是什么意思hcv9jop5ns2r.cn 倾国倾城是什么生肖hcv9jop1ns6r.cn 乡镇党委书记是什么级别tiangongnft.com
月经不来吃什么hcv8jop2ns6r.cn 什么叫副乳bjhyzcsm.com 农历8月15是什么节日zhongyiyatai.com 南辕北辙什么意思hcv7jop5ns3r.cn 囊肿和肿瘤有什么区别wuhaiwuya.com
百度