Testwiki:Reference desk/Archives/Mathematics/2022 February 18: Difference between revisions
Jump to navigation
Jump to search
imported>Scsbot edited by robot: archiving February 18 |
(No difference)
|
imported>Scsbot edited by robot: archiving February 18 |
(No difference)
|
Template:Error:not substituted
|- ! colspan="3" align="center" | Mathematics desk |- ! width="20%" align="left" | < February 17 ! width="25%" align="center"|<< Jan | February | Mar >> ! width="20%" align="right" |Current desk > |}
| Welcome to the Wikipedia Mathematics Reference Desk Archives |
|---|
| The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Is there an established term for the union of the natural numbers and the unit fractions? Or maybe, more precisely, of the natural numbers greater than one, the unit fractions smaller than one, and one?
Programming languages typically have native data types neither for natural numbers only, nor for fractions. When I need a scaling variable that is known to be integral and positive, but the scaling can be either up or down, my preferred solution, instead of using a float, is to wrap an integer with a class and have it map negative values to unit fractions, so z is read as 1/(-z) when z < 0. Or -n^1 is read as n^-1, if you will, in which case the mapping conceptually reduces to moving the sign to a different place.
Never quite know what to call that class, though. :P
- 2A02:560:42A8:BF00:5878:2D04:1599:115 (talk) 16:51, 18 February 2022 (UTC)
{{u|Mark viking}} {Talk} 19:52, 18 February 2022 (UTC)