Template:Order of magnitude
Này Template bị trích dẫn vớiƯớc 128,000 cái giao diện. Vì tránh cho tạo thành đại quy mô ảnh hưởng, sở hữu đối này Template biên tập ứng trước vớiHộp cát,Thí nghiệm dạng lệHoặcNgài hộp cátThượng thí nghiệm. Thí nghiệm sau không có lầm phiên bản có thể dùng một lần mà gia nhập này Template trung, nhưng là sửa chữa trước làm ơn tất vớiThảo luận trangKhởi xướng thảo luận. Khuôn mẫu trích dẫn số lượng sẽ tự động đổi mới. |
Này khuôn mẫu trước mắt chính y theo mặt khác duy cơ bách khoa thượng nội dung tiến hànhPhiên dịch.(2023 năm 3 nguyệt 5 ngày) |
Sử dụng phương pháp
This template calculates the (decimal)order of magnitudeof numbers within the ranges 10300to 10−300and −10−300to −10300.
The acceptable input and the output produced are optimised for use in other templates.
- The hyphen (not a true minus sign) is used for negative numbers.
- No separator is used for thousands.
- The template gives 0 for 0. Although, strictly speaking, this is mathematically incorrect it has been designed this way so as to be more useful in other templates. An important example of this is that when used by {{convert}} 0 °C or 0 °F is considered to be on the same order of magnitude as ±1 °C or ±1 °F respectively.
Kiểu mẫu
{{Order of magnitude|123400}}
→ 5[1]{{Order of magnitude|12340}}
→ 4[2]{{Order of magnitude|1234}}
→ 3[3]{{Order of magnitude|123.4}}
→ 2[4]{{Order of magnitude|12.34}}
→ 1[5]{{Order of magnitude|1.234}}
→ 0[6]{{Order of magnitude|.1234}}
→ -1[7]{{Order of magnitude|.01234}}
→ -2[8]{{Order of magnitude|0}}
→ 0[9]- Template:Xpdoc
Sai lầm cách dùng
The input must be an unformatted number, or the template will emit errors:
{{Order of magnitude|}}
→Expression error: Unexpected = operator{{Order of magnitude|123,400}}
→Expression error: Unrecognised punctuation character ","{{Order of magnitude|foo}}
→Expression error: Unrecognised word "foo"
Kỹ thuật yếu điểm
This template calculates the order of magnitude of a number, using thenatural logarithmof the absolute value of the number, divided by the log of 10. The amount is adjusted fortruncation errorin the digital format, and the floor number of the results is used. The magnitude of fractions, such as 0+1/1000 (-3), will also be calculated. The code uses four expansion-depth levels.
Khuôn mẫu số liệu
Order of magnitude khuôn mẫu số liệu
This template calculates the order of magnitude of numbers within the ranges 10^300 to 10^−300 and −10^−300 to −10^300.
Tham số | Miêu tả | Loại hình | Trạng thái | |
---|---|---|---|---|
Number | 1 | The number to find the order of magnitude of | Con số | Thiết yếu |