Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

floating point

Name: Anonymous 2007-07-11 11:08 ID:1iiSAT9E

In the new C2009 standard, they should introduce an operator for floating point comparisons, to make up for the fact that == doesn't match numbers that are so very nearly the same (like, to 10 decimal places), but not equal.

As this new modern standard will support Ken Thompson's UTF-8 encoding, I would use the symbol "≈". For maximum flexibility, this will be both an infix operator and a function.

The function is defined as ≈(lvalue, rvalue, precision), where precision is an optional parameter specifying the number of binary places to compare. The operator assumes that precision is two binary places less than the least precise out of lvalue and rvalue (so if you're comparing a float and a double it'll take the precision of the float as a basis.)

What do you guys think of my proposal? I'm about to email it to Dennis Richie but am a bit delayed because pine only supports ASCII, so I'm recompiling it under Plan 9.

Name: Anonymous 2007-07-11 12:24 ID:Z82/bPjm

>>3
I'd write Ritchie to ask for true, specified Unicode support with UTF-8 and UTF-16 functions
*facepalm*


(not just vague refrences to "multibyte" and "wide" things)
do you even know what unicode is?


safer sprintf, etc functions;
how about snprintf fuckin moron?


Right now the C standard library is so useless and the language is so limited that you have to implement your own language and libraries with it before doing any real work with it, save for small drivers.
please be a troll.

[i]FUCKING NOOBS[/i]

Name: Anonymous 2007-07-11 12:26 ID:Heaven

look what you've done you've angered me so much with your bullshit i wrote invalid bbcode code

FUCKING DAMN

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List