professional hobbyist, visual novelist (Potion Stand Story, Iron Company), low-rent vtuber, human trainwreck. oregon, USA. let your eyeballs drift gently over to my pinned post for more information and tags and things. long live cohost โค๏ธโ€:eggbug:


โœจ personal website
doodlemancy.com/
๐Ÿ›๏ธ etsy
etsy.com/shop/doodlemancy
๐ŸŸฆ bluesky (most active)
bsky.app/profile/doodlemancy.com
๐Ÿ’Œ my mailing list
doodlemancy.com/#mailinglistinfo
๐Ÿฟ anime list (anilist)
anilist.co/user/doodlemancy/
๐Ÿก toyhouse
toyhou.se/doodlemancy
๐Ÿ“บ twitch
twitch.tv/doodlemancy
๐Ÿ’ญ dreamwidth (RSS-able!)
doodlemancy.dreamwidth.org/
๐ŸŽฎ itch.io
doodlemancy.itch.io/
๐Ÿ”— EVEN MORE PLACES I AM
doodlemancy.com/#links
๐Ÿ›๏ธ pillowfort
www.pillowfort.social/doodlemancy
๐Ÿ˜ mastodon
kind.social/@doodlemancy

i've been working on another little Ren'py side project (a shop simulator kinda thing... you ever play Lemonade Stand? on the Apple II? we're all old here i bet some of you did) to learn some more things i don't understand very well and like, as a non-programmer one of the things i assumed about programming is that it would at least be relatively straightforward to get computers to do math. because on a base level computers are just metal and electricity and like, math. right?

and then somehow i made negative zero.

(i did look up how negative zeroes happen in python and why that is something that can happen, and i fixed it. i just. i have dyscalculia and math always makes me feel like i'm sort of losing my mind and then i saw negative zero and i was like WHAT IS ANYTHING)


You must log in to comment.

in reply to @doodlemancy's post:

the tricky part about making computers do math when I'm not very good at math, is that I'm constantly second-guessing whether I've written my operations right and whether the values I'm getting out of them are correct or not. ...and then I whip out a calculator and let that computer figure it out too. ๐Ÿ˜ตโ€๐Ÿ’ซ

This sounds stupid but is broadly correct because being able to determine which side you came from to get zero is potentially really useful for functional analysis and anywhere you might expect to see discontinuities. Arctan was an example that came up where distinguishing between positive and negative zero could be useful due to how the function diverges.

Python have at least 3 kinds of math out of the box, maybe 4 if you look at complex number. For a shop simulator, I would recommend writing the cents values so it's all whole number.
In computer, we call these Integer and they are nice. If you get a fractional part, in computer it's called a Float and it can introduce small error as the fractional part is approximated from fraction of 1 / 2^x. Just be careful with python division if you come from integer and want float.
Python also have Decimal which represent the exact value of a number with a fractional part but they are slower than float. You also have Complex number, they are useful when working with stuff like audio signal and doing fourier transformation. I also had a nervous laughter when my math teacher introduced them.