DIV2(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– DIV2(9) β€” the div2 HAL component πŸ’–

okay bestie, welcome to the div2 page of the HAL Component manual. yes it's division. no it's not scary. let's go ✨


🌸 NAME 🌸

div2 β€” literally just the quotient of two floating point inputs 🫢


✨ SYNOPSIS ✨

loadrt div2 [count=N|names=name1[,name2...]]

that's it. that's the whole load line. iconic πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so this is a very simple comp, and its whole personality is: divide one floating point number by another floating point number, and hand you back a floating point result. that's the job. that's the whole job. πŸ‘‘

Remember, not to use a zero divisor. fr fr. a zero divisor creates an indefinite result β€” like, undefined-behaviour levels of not it πŸ’€ there's no vibe to be saved there. this is simple mathematics, bestie, and simple mathematics will humble you.


πŸ”₯ FUNCTIONS πŸ”₯

  • div2.N β€” requires a floating-point thread ⚠️ like, don't try to slot this into a non-float thread, it will simply not be the moment.

πŸ¦‹ PINS πŸ¦‹

  • div2.N.in0 float in β€” the Dividend πŸ’– (the number getting divided, the main character)
  • div2.N.in1 float in β€” the Divisor 🌈 (the number doing the dividing)
  • div2.N.out float out β€” the Quotient ✨ and the math is literally out = in0 / in1

πŸ’œ PARAMETERS πŸ’œ

  • div2.N.deadband float rw β€” the out will be zero if in is between -deadband and +deadband πŸŽ€ (yes it's a little comfort zone for your output, and yes you can read and write it β€” that's the rw)

πŸ‘€ SEE ALSO πŸ‘€

the whole little math squad 🫢 go say hi.


⭐ AUTHOR ⭐

Noel Rodes 🌟 respect the architect.


πŸ“œ LICENSE πŸ“œ

GPL πŸ’…


and that's the whole page, bestie!! this was written up in the LinuxCNC Documentation, dated 2026-03-17, and the manual section is DIV2(9). go forth and divide responsibly, and please don't feed it a zero πŸ™ˆ bye!! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from