แม่แบบ:Order of magnitude

จากวิกิพีเดีย สารานุกรมเสรี
Documentation icon คู่มือการใช้งานแม่แบบ[ดู] [แก้] [ประวัติ] [ล้างแคช]

การใช้งาน[แก้]

แม่แบบนี้จะคำนวณอันดับของขนาด (ฐานสิบ) ของจำนวนภายในช่วง 10300 ถึง 10−300 และ −10−300 ถึง −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.

ตัวอย่าง[แก้]

  • {{Order of magnitude|123400}} → 5
  • {{Order of magnitude|12340}} → 4
  • {{Order of magnitude|1234}} → 3
  • {{Order of magnitude|123.4}} → 2
  • {{Order of magnitude|12.34}} → 1
  • {{Order of magnitude|1.234}} → 0
  • {{Order of magnitude|.1234}} → -1
  • {{Order of magnitude|.01234}} → -2
  • {{Order of magnitude|0}} → 0
  • {{Order of magnitude}} → 0

การใช้งานที่ไม่ถูกต้อง[แก้]

อินพุตจะต้องเป็นตัวเลขที่ไม่ได้จัดรูปแบบ ไม่เช่นนั้นแม่แบบจะแสดงข้อความข้อผิดพลาด

  • {{Order of magnitude|}}ข้อผิดพลาดนิพจน์: มีตัวดำเนินการ = ซึ่งไม่ควรมี
  • {{Order of magnitude|123,400}}ข้อผิดพลาดนิพจน์: "," เป็นอักขระเครื่องหมายวรรคตอนที่ไม่รู้จัก
  • {{Order of magnitude|foo}}ข้อผิดพลาดนิพจน์: "foo" เป็นคำที่ไม่รู้จัก

ประเด็นทางเทคนิค[แก้]

This template calculates the order of magnitude of a number, using the natural logarithm of the absolute value of the number, divided by the log of 10. The amount is adjusted for truncation error in 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.

ข้อมูลแม่แบบ[แก้]

ด้านล่างนี้คือข้อมูลแม่แบบ เอกสารกำกับสำหรับแม่แบบนี้ซึ่งถูกใช้งานโดยเครื่องมือแก้ไขแบบเห็นภาพและเครื่องมืออื่น ๆ

ข้อมูลแม่แบบสำหรับ Order of magnitude

แม่แบบนี้จะคำนวณอันดับของขนาดของจำนวนภายในช่วง 10^300 ถึง 10^−300 และ −10^−300 ถึง −10^300

พารามิเตอร์แม่แบบ[แก้ไขข้อมูลแม่แบบ]

พารามิเตอร์คำอธิบายชนิดสถานะ
จำนวน1

จำนวนที่จะใช้หาอันดับของขนาด

จำนวนจำเป็น

ดูเพิ่ม[แก้]