Post B0qF4lA6OQFkS0SJs0 by jakebrake@ohai.social
 (DIR) More posts by jakebrake@ohai.social
 (DIR) Post #B0qDiW35noENFm0TJI by futurebird@sauropods.win
       2025-12-02T14:51:40Z
       
       0 likes, 0 repeats
       
       The TI-34 is a fairly basic scientific #calculator. I’m a big fan because it’s easy to use and not overwhelming. I was reading the manual and discovered it has two functions:ipart(x) fpart(x)These return the integer and fraction parts of x.ipart(2.34)=2fpart(2.34)=.34Great! So, uh.. What are these typically used for? Why include them on such a *basic* calculator? #calculators #ticalc #ti34 #matheducation #mathchat
       
 (DIR) Post #B0qECjndF5MUaVBaO8 by nazokiyoubinbou@urusai.social
       2025-12-02T14:57:06Z
       
       0 likes, 0 repeats
       
       @futurebird On a graphing calculator that would have a myriad of functions no doubt.On a scientific calculator...  Really makes you wonder if it was just an oversight or something, lol.  I suppose through judicious use of parenthesis and repetition you could build something with that.
       
 (DIR) Post #B0qEcMsB6c9d0kX9aC by futurebird@sauropods.win
       2025-12-02T15:01:46Z
       
       1 likes, 4 repeats
       
       On a slight tangent I have just noticed that on the TI 84 int(x) is NOT the same as in python. Who is to blame for this? #ti84 #python #horror
       
 (DIR) Post #B0qEkAYOn7uv7Z0Bwu by futurebird@sauropods.win
       2025-12-02T15:03:04Z
       
       0 likes, 0 repeats
       
       @inherentlee It has division with remainder by using 2nd and the division symbol. This thing is in the “math” menu.
       
 (DIR) Post #B0qEnycT6ZOpGWim3c by burnoutqueen@todon.nl
       2025-12-02T15:03:49Z
       
       0 likes, 0 repeats
       
       @futurebird the ti 84 rounds, while python truncates.
       
 (DIR) Post #B0qEzfER0txObw3Jke by danpmoore@mathstodon.xyz
       2025-12-02T15:05:55Z
       
       0 likes, 0 repeats
       
       @futurebird Looks like a Python screwup. Excel gives -4.
       
 (DIR) Post #B0qF2FhiNiRoJ4yxbU by jordan@sometimes.social
       2025-12-02T15:06:06Z
       
       0 likes, 0 repeats
       
       @futurebird I think the TI-84 is MicroPython, I wonder if it exhibits the same behavior on other platforms
       
 (DIR) Post #B0qF4lA6OQFkS0SJs0 by jakebrake@ohai.social
       2025-12-02T15:01:10Z
       
       0 likes, 0 repeats
       
       @nazokiyoubinbou @futurebird My fuzzy brain vaguely remembers fpart() being handy for "clock arithmentic", converting decimal hours into minutes, for instance. And similarly for converting decimal feet into inches and decimal inches into fractions.But it seems like there was a more useful trick involving "slide rule math", something to do with fractional exponents, but I can't remember the specifics. Ring any bells?
       
 (DIR) Post #B0qF4meyp6Xx63uUdc by nazokiyoubinbou@urusai.social
       2025-12-02T15:04:27Z
       
       0 likes, 0 repeats
       
       @jakebrake @futurebird To some extent I could see such things, but remember, this is a scientific calculator.  That means everything you punch in you're doing by hand.  Really, at that point it's easier just to type in the decimal part in parenthesis where needed.Actually, I'm just not sure how you could use that well on a scientific calculator.  It only truly makes sense when working with variables.
       
 (DIR) Post #B0qF4nb7Kx3E0N6vFw by futurebird@sauropods.win
       2025-12-02T15:06:46Z
       
       0 likes, 0 repeats
       
       @nazokiyoubinbou @jakebrake It does have a little “operations” button where you can define a function with one variable. Maybe it could be used with that?
       
 (DIR) Post #B0qF9iZZRm2VrtjUgq by xinniw@post.lurk.org
       2025-12-02T15:07:42Z
       
       0 likes, 0 repeats
       
       @futurebird that is not what would expect casting to int from float to do
       
 (DIR) Post #B0qFBSPMWA2sJVmrlw by nazokiyoubinbou@urusai.social
       2025-12-02T15:08:05Z
       
       0 likes, 0 repeats
       
       @futurebird @jakebrake I would definitely only use that with a variable.  In almost anything else it makes more sense just to type in the number yourself as you go.  Perhaps a button like that could indeed help if it is something you repeat a lot (though I can't imagine repeating usage of this a lot?)
       
 (DIR) Post #B0qFCCEe8Ko2Rb7xSK by futurebird@sauropods.win
       2025-12-02T15:08:11Z
       
       0 likes, 0 repeats
       
       @jordan That’s not the 84 running python that’s how the TI calculator evaluates the function. If I opened python I’d get the same answer as I did on my computer running python.
       
 (DIR) Post #B0qFGAINHtxPaOlPQ8 by futurebird@sauropods.win
       2025-12-02T15:08:54Z
       
       0 likes, 0 repeats
       
       @mdc I’m showing what TI basic would return.
       
 (DIR) Post #B0qFPdO0UwFQPquhCC by jordan@sometimes.social
       2025-12-02T15:10:24Z
       
       0 likes, 0 repeats
       
       @futurebird ah I see!
       
 (DIR) Post #B0qFZfZtCjKm6pFy4W by mpark@mathstodon.xyz
       2025-12-02T15:12:26Z
       
       0 likes, 0 repeats
       
       @futurebird There's a definitional difference. Python describes the int() function as returning the integer portion and Excel (and I'm guessing the calculator as well) defines it as rounding down to the nearest integer. So -3.8 rounds down to -4, where python returns the integer portion, -3. To be clear, I really don't like the Excel definition.
       
 (DIR) Post #B0qFdOqXLyuHNLp1ai by futurebird@sauropods.win
       2025-12-02T15:13:08Z
       
       0 likes, 0 repeats
       
       @mdc nah it’s not you this is a little confusing— and I wonder if it should be considering these are educational devices. I do think part of the problem is “int” is a type in python— but it’s just an operation on the calculator.
       
 (DIR) Post #B0qFk37oVlWu2F4dii by futurebird@sauropods.win
       2025-12-02T15:14:21Z
       
       0 likes, 0 repeats
       
       @sidereal You see this is why I don’t like this even if I can explain why it happens.
       
 (DIR) Post #B0qFwaQ6XyqAlybibY by Smoljaguar@spacey.space
       2025-12-02T15:16:34Z
       
       0 likes, 0 repeats
       
       @futurebird I think python is just doing it the way c does when you write `int f(float x){return (int)x}`
       
 (DIR) Post #B0qGtBTEx50uTl11NY by danpmoore@mathstodon.xyz
       2025-12-02T15:27:11Z
       
       0 likes, 0 repeats
       
       @futurebird Python evaluates int(x) as [x], whereas TI evaluates it as [|x|]*sign(x), I think - i,e, using the square brackets to mean the largest integer less that x. It's not rounding, I would guess.
       
 (DIR) Post #B0qGy3JQiAbqcmkS12 by adardis@mstdn.social
       2025-12-02T15:28:04Z
       
       0 likes, 0 repeats
       
       @futurebird just piling on here: I would have defined it as your Python does (the integer part). I just asked Common Lisp what it does (my current learn-a-computer-language hobby) and it doesn't pre-define an integer function. The manual says "The ceiling, floor, round and truncate functions convert floating point or rational numbers to integers".
       
 (DIR) Post #B0qHS9OEgDCMA3LdZY by david_chisnall@infosec.exchange
       2025-12-02T15:33:30Z
       
       0 likes, 0 repeats
       
       @futurebird The TI calculator does what mathematics normally means (round to nearest).A programming language will do one of the things specified in IEEE 754 floating-point rounding modes.  The default for Python (and C), I believe, is 'round towards zero', also known as truncation.  This is implemented in floating point as a very simple normalisation operation (shift the mantissa so that the exponent is 1, which either shifts some zeroes in from the right or shifts some bits off to the right and loses them).The extra fun on the calculator might be that it's may be using some binary-coded decimal representation internally, because otherwise you have fun rounding errors from not being able to represent a lot of decimal fractions precisely in a binary floating-point value.  More advanced calculators will store rational numbers fractions, which lets them avoid any precision loss until the final convert-to-decimal step that they do for display.
       
 (DIR) Post #B0qIv4xaKRsgm4Exma by futurebird@sauropods.win
       2025-12-02T15:49:55Z
       
       0 likes, 0 repeats
       
       @risc  Ok but that calculator also runs python which means you can get both results on the same device you hand to children.
       
 (DIR) Post #B0qN8R6jhBKn2r94j2 by 4raylee@mathstodon.xyz
       2025-12-02T16:36:34Z
       
       0 likes, 0 repeats
       
       @futurebird Related, all the variations in how modulo works across programming languages.https://en.wikipedia.org/wiki/Modulo#In_programming_languages
       
 (DIR) Post #B0qNNkW3okTFaDICS8 by log@mastodon.sdf.org
       2025-12-02T16:39:53Z
       
       0 likes, 0 repeats
       
       @futurebird Different program languages using the same text string as the name for different functions.  What does it mean?  Integer type coercion?  The integer part?  Round to nearest integer?  The only way to win is not to play.
       
 (DIR) Post #B0qV9m443xoZxs2q24 by stevenaleach@sigmoid.social
       2025-12-02T18:07:03Z
       
       0 likes, 0 repeats
       
       @futurebird Doesn't seem strange to have, but more used to % and // as in Python, or similar.Not used seeing a function name, just basic syntax for them.
       
 (DIR) Post #B0qVx7a4r21gszY67s by su_liam@mas.to
       2025-12-02T17:19:58Z
       
       0 likes, 1 repeats
       
       @adardis @futurebird Are you a programmer or a mathematician?
       
 (DIR) Post #B0qW0Dpe4MYv8sJF32 by futurebird@sauropods.win
       2025-12-02T18:16:33Z
       
       0 likes, 0 repeats
       
       @su_liam @adardis **has existential crisis**
       
 (DIR) Post #B0qWVV87o0SplgrsYK by adriano@lile.cl
       2025-12-02T18:22:08Z
       
       0 likes, 0 repeats
       
       @futurebird @su_liam @adardis (they both say Python)(Existential crisis intensifies)
       
 (DIR) Post #B0qjiubRhxAhwKJ8ym by futurebird@sauropods.win
       2025-12-02T20:50:17Z
       
       0 likes, 1 repeats
       
       I tend to imagine that every feature included on a calculator like the TI-34 had to fight to be there. It's a very stripped down calculator and, as an educator I can tell exactly why everything else is there. From little things, like how it won't reduce square roots (this would make teaching the conceptual part of that skill very annoying) to the inclusion of doing stdev for only 35 numbers. But the ipart() and fpart() have me stumped!I must go deeper!
       
 (DIR) Post #B0qjodF3AZBxpfYlrE by futurebird@sauropods.win
       2025-12-02T20:51:20Z
       
       0 likes, 0 repeats
       
       I'm starting to wonder if it's there because of one textbook in some country or region I don't know about... or maybe it's just something that people who design calculators think is useful that baffles everyone else?
       
 (DIR) Post #B0qkHNGPed7Cfvu1Nw by lauerhahn@sfba.social
       2025-12-02T20:56:30Z
       
       0 likes, 0 repeats
       
       @futurebird In Excel I use similar functions when trying to do math with times & dates. Not sure if that's an application you would use on a calculator though... it's been a really long time since I used a scientific calculator.
       
 (DIR) Post #B0qkIE6fBboAZ2kU2y by Bongolian@mstdn.social
       2025-12-02T20:56:35Z
       
       0 likes, 0 repeats
       
       @futurebird Perhaps they just imported the functions bundle from an older calculator that was programmable where it would have been useful?
       
 (DIR) Post #B0qkZLZ2iBw8cJBd5M by llewelly@sauropods.win
       2025-12-02T20:59:46Z
       
       0 likes, 0 repeats
       
       @futurebird when were these functions added? The TI-34 goes back to the 1980s, so it's possible they were added long ago for reasons relevant to that distant era, and kept for backwards compatibility. (Something similar applies to the behavior of int() on the TI-84)
       
 (DIR) Post #B0qkswYLPeJGpzCjBI by futurebird@sauropods.win
       2025-12-02T21:03:14Z
       
       0 likes, 0 repeats
       
       @rhempel Ok maybe doing it on a list would be worth it?
       
 (DIR) Post #B0qkx1fWKnNVrVVWzY by stevegis_ssg@mas.to
       2025-12-02T21:04:01Z
       
       0 likes, 0 repeats
       
       @futurebird You'd use them in time calculations (multiplying fpart of hours by 60 to get minutes, etc.); could they be there primarily for that?
       
 (DIR) Post #B0qlGunHbXDMKdcdm4 by KalenXI@mastodon.social
       2025-12-02T21:07:35Z
       
       0 likes, 0 repeats
       
       @futurebird As best I can tell they're probably there because they were carried over from TI-Basic which was made for the TI-83 and 89 series.Apparently they're useful for compressing integer and floating point data in arrays: http://tibasicdev.wikidot.com/compression
       
 (DIR) Post #B0qlJEBKUYPx2cyMbo by anselmschueler@ieji.de
       2025-12-02T21:07:56Z
       
       0 likes, 0 repeats
       
       @futurebird What's stdev stand for here?
       
 (DIR) Post #B0qqrYQ0G4lNQA1WKG by adardis@mstdn.social
       2025-12-02T22:10:15Z
       
       0 likes, 0 repeats
       
       @futurebird @su_liam **does laps in existential swimming pool**
       
 (DIR) Post #B0qr4c2y4xcoRHTYsS by adardis@mstdn.social
       2025-12-02T22:12:38Z
       
       0 likes, 0 repeats
       
       @futurebird @su_liam @adriano  laps in existential swimming pool**
       
 (DIR) Post #B0qr7BEUEKJW935VPE by adardis@mstdn.social
       2025-12-02T22:13:06Z
       
       0 likes, 0 repeats
       
       @futurebird @su_liam @adriano  ** does laps in existential swimming pool**
       
 (DIR) Post #B0qt9VHSrYKioIiTOy by eigen@mattstodon.panar.ooo
       2025-12-02T22:35:54Z
       
       0 likes, 1 repeats
       
       @futurebird I'm going to pull a guess straight out of thin air, but I think they might be intended for US Imperial Units use: where there's e.g. feet + inches, or pounds + ounces, etc: you can then perform additional arithmetic on the units "independently" when you can extract integer & fraction
       
 (DIR) Post #B0qthetFdpRYSXg2iG by futurebird@sauropods.win
       2025-12-02T22:42:08Z
       
       0 likes, 0 repeats
       
       @eigen OMG. This kind of makes sense.
       
 (DIR) Post #B0qtv41TVgmsAguqP2 by Moss@beige.party
       2025-12-02T21:22:47Z
       
       0 likes, 1 repeats
       
       @rhempel @futurebird In sickness and in health, till engineers do ipart()
       
 (DIR) Post #B0qu4expX6PVLgmppQ by futurebird@sauropods.win
       2025-12-02T22:45:41Z
       
       0 likes, 0 repeats
       
       @ielenia @eigen it's not "US Imperial"yeah.... but is FEELs like that sometimes doesn't it?
       
 (DIR) Post #B0qv7Pdn3p1UeDI1Vw by dpiponi@mathstodon.xyz
       2025-12-02T22:57:55Z
       
       0 likes, 0 repeats
       
       @futurebird It's pretty essential for programmable calculators [1] and I wouldn't be surprised if it's there because it shares functionality (and code) with a programmable. I've often wanted it (slightly) to help convert a race time to minutes per mile.[1] Random examples: finding good rational approximations to real numbers and generating random numbers.
       
 (DIR) Post #B0qvCE5lQUSwHGfZUO by futurebird@sauropods.win
       2025-12-02T22:58:43Z
       
       0 likes, 0 repeats
       
       @oscherler @su_liam @adardis So it's like being bisexual??
       
 (DIR) Post #B0qylbek6gbHMHao1A by sophieschmieg@infosec.exchange
       2025-12-02T23:38:47Z
       
       0 likes, 1 repeats
       
       @futurebird you need them to compute the continued fraction expression of a number: starting with x0 = x, at each step, you set a_k = ipart(x_k), x_k+1 = 1/fpart(x_k).For example, if you do that for x = π, you get a0 = 3, a1 = 7, and if you stop there, you get the famous approximation of π ≈ 3 + 1/7 = 22/7.
       
 (DIR) Post #B0rKSjUiwCDb9sJOwi by brouhaha@mastodon.social
       2025-12-03T03:41:56Z
       
       0 likes, 0 repeats
       
       @futurebird @oscherler @su_liam @adardis It's like being attracted to both little-endian and big-endian processor architecture: bytesexual.
       
 (DIR) Post #B0thd8lYWJRnh62KKe by su_liam@mas.to
       2025-12-04T07:10:57Z
       
       0 likes, 0 repeats
       
       @futurebird @adardis My apologies.