Wikipedia:Reference desk/Archives/Mathematics/2022 February 21

= February 21 =

The meaning of div(x, y)
On a wepage that talks about the Julian Day Number and its converts ions to and from various different calendars (the webpage is aa.quae.nl/en/reken/juliaansedag.html ), I saw something. Section 3.1 talks about converting the Gregorian calendar to the JDN. The third line of this section (the eighth line of math overall) says the value {x3, x2} = div(x4, 100). For x4 values that are positive or zero (as they are for all proleptic Gregorian calendar dates from March of 1 BC or after), this seems to be quite straightforward, with x3 being the floor function of the quotient of x4 and 100, and x2 being x4 mod 100. My question is, what does div(x4, 100) mean for x4 values that are negative (like for proleptic Gregorian calendar dates from February of 1 BC or earlier)? Primal Groudon (talk) 17:59, 21 February 2022 (UTC)


 * There is no generally agreed conventional meaning for this notation. The webpage states (in Section 15.1): "The function DIV(x,y) corresponds to ⌊x/y⌋." If this also applies to the use of $$\operatorname{div}$$, we have, for example, $$\operatorname{div}(-123,100)=\lfloor-1.23\rfloor=-2.$$ --Lambiam 20:23, 21 February 2022 (UTC)
 * Note that this definition implies that for all $$x$$ and for $$y>0,$$
 * $$0\leq x-y\,\operatorname{div}(x,y) < y.$$
 * Together with the range of $$\operatorname{div}$$ being the integers, this property characterizes the function for positive second arguments completely. --Lambiam 00:29, 22 February 2022 (UTC)