Qurak

Do calculations with units

ตัวอย่าง 4 ขั้นตอน รันตามลำดับในหนึ่งเซสชัน ทุกขั้นถูกรันกับเอนจินจริง และเอาต์พุตด้านล่างคือสิ่งที่มันให้

ขั้นที่ 1
Quantity[19.25, "Kilometers"] + Quantity[13, "Miles"]
เอาต์พุต
Quantity[40.171472, Kilometers]
ขั้นที่ 2
Quantity[20, "Feet"] / Quantity[2.3, "Seconds"] + Quantity[9, "Meters" / "Seconds"]
เอาต์พุต
Quantity[38.22321122903116, Feet/Seconds]
ขั้นที่ 3
N[Quantity[175, "Pounds"] / Quantity[100, "Kilograms"]]
เอาต์พุต
0.7937866475
ขั้นที่ 4
Quantity[24, "Miles" / "Gallons"] * Quantity[16.2, "Gallons" / IndependentUnit["tank"]] * Quantity[1 / 8, IndependentUnit["tank"]]
เอาต์พุต
Quantity[48.599999999999994, Miles/Gallons*Gallons/IndependentUnit["tank"]*IndependentUnit["tank"]]

ฟังก์ชันที่ใช้

สูตรงานที่เกี่ยวข้อง

สูตรงานทั้งหมด · เอกสารอ้างอิงฟังก์ชัน · ใช้สิ่งนี้จากไคลเอนต์ MCP