4 ms·
> Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to Celsius how is C =
by hprotagonist 6y ago
> Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to Celsius
how is
C = (5/9)(F-32)
not linear?
- oddeyed 6y agoIn certain contexts (such as linear algebra), linear refers to the fact that the mapping must cross the origin. This follows from the constraint that for a linear map f, f(a + b) = f(a) + f(b), which is not true for the farenheit-celsius example. EDIT: See https://en.wikipedia.org/wiki/Linear_function#As_a_linear_map https://en.wikipedia.org/wiki/Linear_function#As_a_linear_ma...
- jtanderson 6y agoAlso: a linear function plus a constant is said to be affine! Reference: https://mathworld.wolfram.com/AffineFunction.html https://mathworld.wolfram.com/AffineFunction.html
- phkahler 6y agoI just learned something. Is it correct to call both of the first order? Or is that term really only to be used for the underlying polynomials?
- dan-robertson 6y agoI think of nth order as mostly just applying to approximations. But I guess first order would be ok here.
- deleted 6y ago[deleted]
- olikas 6y agoIf f is linear, then f(a)=f(a+0)=f(a)+f(0). So f(0)=0.
- HourglassFR 6y agoBecause 0°C is not 0°F
- deleted 6y ago[deleted]
- SahAssar 6y agoAs I understood it: C to K would be linear since they are always offset by the same amount, but 0°C is not 0°K. C to F is not linear since they are not offset by the same amount.
- _0ffh 6y agoIt seems to me C to K is affine as well. True, it's somewhat special in that the factor is exactly one, but if there's an offset it's not linear in the sense of the sentence under discussion.
- dhosek 6y agoThat's not how it works. The definition of linear used in this context requires f(a+b) = f(a) + f(b) which is not the case with the C to K translation which is f(x) = x + 273.15 Only functions in the form y=mx+0 meet the criteria.
- wl 6y agoIt's affine. It's not linear because the offset means superposition doesn't hold.
- CyberRabbi 6y agoIt’s linear in terms of its order but it’s not a linear transformation, which must satisfy: f(c*(a+b)) = c*f(a) + c*f(b) Where c is a scalar. A and b are abstract objects. Examples include vectors, real numbers, and functions themselves.
- amelius 6y agoLinear does not mean "graph is a line". It means "graph is a line through origin" (in the 2d case). Somewhat counterintuitive, but that's how it's defined.
- diarrhea 6y agoThe Wikipedia article someone else posted already seems to disagree: https://en.wikipedia.org/wiki/Linear_function https://en.wikipedia.org/wiki/Linear_function. This confuses me.
- TeMPOraL 6y agoThe article actually agrees. > In mathematics, the term linear function refers to two distinct but related notions (...) [proceeds to specify them using incomprehensible math words] GNU Units documentation uses the second notion, common with linear algebra (and thus arguably more common in any computing) - the notion that calls y=ax a linear function, and y=ax+b an affine function.
- tait 6y agoSo, rather than calling it non-linear, which is clearly somewhat confusing, perhaps it would be more clear to state that it handles affine functions like F to C...?
- TeMPOraL 6y agoPerhaps. That's what I myself did when adding handling for affine unit conversions in a project I worked on.
- zeroimpl 6y agoAgreed. Why they wasting our time pointing out it’s “non-linear” when this statement is only true for some definitions of linear? Just pick a non-ambiguous word, or add an asterisk and footnote.
- mcguire 6y agoFrim jxy's 6th edition man page: "Units only does multiplicative scale changes. Thus it can convert Kelvin to Rankine, but not Centigrade to Fahrenheit."
- jhoechtl 6y agoIt's even in the documentation to Units: > But Fahrenheit to Celsius is linear, you insist. Not so. A transformation T is linear if T(x+y)=T(x)+T(y) and this fails for T(x)=ax+b . This transformation is affine, but not linear. https://www.gnu.org/software/units/manual/html_node/Overview.html#Overview https://www.gnu.org/software/units/manual/html_node/Overview...