Author Topic: Features Wishlist  (Read 689881 times)

0 Members and 2 Guests are viewing this topic.

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2505 on: August 08, 2011, 11:33:35 am »
I'll agree with Ashbad that the loss of precision in the third decimal digit will probably confuse some people. Perhaps just a mention of this in the readme would do?

^ If it must stay, this is the best option.  How about in the command reference thing?

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2506 on: August 08, 2011, 11:53:46 am »
Ok, a few things.
That .22 of 7.22? That means that, beyond those 7 decimal digits, only 22% of numbers result in a unique binary value.
It should also be stated that, to avoid confusion, you can enter it in hex, as EXXXX
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: Features Wishlist
« Reply #2507 on: August 09, 2011, 08:21:10 am »
Are there any posibillities to calculate with numbers like 3.58264579835 so that it uses the 3.58... but tells you 4 if ypu check the number?

(I need it for games when you are controling a little point and have to run way of a few enemies which are calculating the best path to your position and then walk exactly the streak on 1 or 2 (whatever I choose)



Someone - i thenk it was runner - has helped me with such a program.
I think he has multipled every var with 255 or something.
But I haven't really understood that.


Is there any special command in axe?

or may someone make such a command for the next version of Axe??
*insert supercool signature*

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2508 on: August 09, 2011, 08:25:56 am »
Ok, a few things.
That .22 of 7.22? That means that, beyond those 7 decimal digits, only 22% of numbers result in a unique binary value.

*seven* decimal digits?  22%?  Assuming you mean after that decimal digit, only 22% of numbers are represented, that might be true if you account for the useless 3rd digit that nobody should ever use, but that ".22" is completely represented as a unique value.

Offline Compynerd255

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +53/-4
  • Betafreak Games
    • View Profile
    • Betafreak Games
Re: Features Wishlist
« Reply #2509 on: August 09, 2011, 10:06:24 am »
Since Axe is a language used mostly by inexperienced programmers that haven't touched face with computer languages like C++ or Java,
BLASPHEMY! I write in C# and use floating points all the time! And I use Axe!

I do see you guys's point with killing the third decimal point simply because the percision isn't offered. I would propose an XXX.XX way of writing numbers so that it isn't confusing why comparisons aren't working, but you can still go all the way up to 255 (an XX.XX would only allow up to 99). Also, another question: will putting a degree sign before a fixed-point decimal variable return the whole number portion of said variable (like int(x) in BASIC)?
The Slime: On Hold, preparing to add dynamic tiles

Axe Eitrix: DONE

Betafreak Games: Fun filled games for XBox and PC. Check it out at http://www.betafreak.com



Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #2510 on: August 09, 2011, 10:36:51 am »
The degree sign is already used to use the address of a variable. If I could remember how Axe did fixed point, I'd give you a simple workaround for it. :/
As for the 2- or 3-digits issue:
First, note that the underlying format uses base 2, while the numbers are expressed in source as base 10.
8 binary digits (I'm not using 'bits' in hope that what I say will be slightly clearer) have more precision than 2 decimal digits. This can easily be seen by noting that 28 = 256 > 102 = 100.
8 binary digits are also less precise than 3 decimal digits. Once again, 28 = 256 < 103 = 1000.
The reasons behind each preference for a certain length are, as I understand it, as follows:
2 digits: We want the underlying format to be more precise than the input format, so that nobody is confused by the loss of precision resulting from expressing the number in 3 digits.
3 digits: We want the input format to be more precise than the underlying format, so that everybody has full control over the contents of the resulting binary fixed-point number.

I do support 3 digits, though. A note in the README should suffice to alert about the loss of precision.
The main reason is that, if you only want to use 2 digits, then you only use 2, while you can't use 3 if there's only support for 2.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2511 on: August 09, 2011, 10:40:19 am »
Since Axe is a language used mostly by inexperienced programmers that haven't touched face with computer languages like C++ or Java,
BLASPHEMY! I write in C# and use floating points all the time! And I use Axe!

Welcome to the 1% of programmers who don't fit that description.

Quote
I do see you guys's point with killing the third decimal point simply because the percision isn't offered. I would propose an XXX.XX way of writing numbers so that it isn't confusing why comparisons aren't working, but you can still go all the way up to 255 (an XX.XX would only allow up to 99). Also, another question: will putting a degree sign before a fixed-point decimal variable return the whole number portion of said variable (like int(x) in BASIC)?

XX.XX would work, since the 99 there would actually represent 255.  That way, each representation of "1" would actually mean 2.55 instead.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #2512 on: August 09, 2011, 10:44:23 am »
Also, people seem to be using different notations. Using "AAA.BBB" to mean AAA + BBB/256 is not how numbers are normally expressed. As far as I was aware, this was going to be straightforward decimal notation, where "AAA.BBB" means AAA + BBB/1000, rounded to the nearest 256th.
Edit: the unconventional notation would also make it more confusing for beginners, by the way.
« Last Edit: August 09, 2011, 10:45:16 am by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #2513 on: August 09, 2011, 02:35:02 pm »
Are there any posibillities to calculate with numbers like 3.58264579835 so that it uses the 3.58... but tells you 4 if ypu check the number?
You can round a fixed-point value A to the nearest integer by doing A+128//256. If you want to round down always, do A//256. If you want to round up always, do A+255//256.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2514 on: August 09, 2011, 04:26:24 pm »
Also, people seem to be using different notations. Using "AAA.BBB" to mean AAA + BBB/256 is not how numbers are normally expressed. As far as I was aware, this was going to be straightforward decimal notation, where "AAA.BBB" means AAA + BBB/1000, rounded to the nearest 256th.
Edit: the unconventional notation would also make it more confusing for beginners, by the way.

Oh, I thought the top XXX was specified from 0-999, not 0-255.  If it is 0-255, then I agree, thats confusing as hell and the system isn't very well thought out.  And to think I was only arguing against something insignificant like the lower XXX...

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #2515 on: August 09, 2011, 04:30:13 pm »
There's absolutely no way you could specify the integer part from 0-999 unless you did 10.6 fixed point instead of 8.8, which is what Axe uses ;)
Also, given that Axe treats all fixed-point numbers as signed, the integer part can only be from -128 to 127, anyway.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2516 on: August 09, 2011, 04:49:40 pm »
There's absolutely no way you could specify the integer part from 0-999 unless you did 10.6 fixed point instead of 8.8, which is what Axe uses ;)
Also, given that Axe treats all fixed-point numbers as signed, the integer part can only be from -128 to 127, anyway.

Well, 0-999 where each "1" actually represents .30625.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #2517 on: August 09, 2011, 05:31:27 pm »
Ah, I see. Yeah, that's confusing, though :/
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2518 on: August 09, 2011, 05:33:48 pm »
Ah, I see. Yeah, that's confusing, though :/

Either way, the 0-255 or 0-999, it's confusing

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #2519 on: August 09, 2011, 06:20:09 pm »
0-127 is no more confusing than -32768-32767 or 0-65535.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman