question about using pack, unpack, and prepend with floating point numbers

Oct 20, 2011 at 1:29am

question about using pack, unpack, and prepend with floating point numbers

hello max community,
i've started learning max recently, and have been going through a few max tutorials from the max help section. i'm currently on the “mouse drawing” tutorial, but i've made a small patch and there's one small thing about it that doesn't make sense to me.

i've read that the arguments for the pack and unpack objects can be mixed and matched with different “types” of arguments, such as integers, floating point numbers, and symbols, in any order. so i tried to come up with a small patch as a way to show myself the concept.

i set up a patch with a message box that contains a list with a symbol, integer, and floating point number in a message. this message gets unpacked, and then packed again, sent through the prepend, and finally printed in the max window.

when i look at the max window it prints what i expect it too, except for one problem. i chose 64.3 as my floating point number to be sent through, but when it gets processed, it prints 64.300003 in the floating point number box and in the max window. why doesn't it just print 64.3 like i have it? just a small question i have before i move on further. any insight on this would be appreciated, thanks.

[attachment=173575,2744] [attachment=173575,2745]

Attachments:
  1. maxwindow.png
#59438
Oct 20, 2011 at 1:45am

look! up there in the sky! it’s Peter Castine! “Heeeere I Come To Save The Daaayyyyy!!!” :D

http://cycling74.com/forums/topic.php?id=20189

#213924
Oct 20, 2011 at 6:20pm

-)

#213925
Oct 22, 2011 at 6:25pm

peter should have a tutorial for this under “my tools”

#213926
Oct 24, 2011 at 9:01am

Yeah, but almost nobody reads that stuff. Most people will just post the question rather than search the site. So I’d just end up posting RTFT and people would think I’m even more annoying than I am.

#213927

You must be logged in to reply to this topic.