This is an archive of CompuServe forum messages from 1985 to 1995, as saved in transcripts by John Foust.
Search Results (4,939 messages)
Well, I have a string multiply in a system I wrote, it has to multiply a 9(4.6) by a 9(3.2) or a 9(3). How would you do this??? Phill
Ok, I would like to see the code Phill
I knew that you'd look it up and have it exactly, Jim. Yep, he was pretty busy, all right!! —Betty
It's I KINGS 7, verse 23: (quoting Revised Standard): "Then he made the molten sea: it was round, ten cubits from brim to brim, .. and a line of thirty cubits measured its circumference". Now, Betty, you can't expect a man who has seven hundred wives, princesses, and three hundred…
The passage you mentioned is in II Kings – forget the chapter and verse – that was describing one of the fountains or baths in the court of Solomon's temple. It gave the circumference and the diameter, which had a ratio of three. The fountain was, as best I can…
> Then again, I'm told that on one occasion in the 19th century, a state > legislature passed a law that in that state, the value of pi would be > taken as 3. Seems they wanted to simplify things .. 🙂 I read about this years ago in one…
> I have heard that NASA during the moon program use 3.14 as PI not 3.1415…, >which is what I would expect. If you mean they puposely did so, I'd question the context. If you mean some part of the code did so, I wouldn't doubt it. >Though the instructor…
> NASA used 3.14 instead of 3.1415927… I doubt it. Then again, I'm told that on one occasion in the 19th century, a state legislature passed a law that in that state, the value of pi would be taken as 3. Seems they wanted to simplify things .. 🙂 –Jim
Hi Jim, I have heard that NASA during the moon program use 3.14 as PI not 3.1415…, which is what I would expect. Though the instructor told us this while showing us how hard it is to be truely accurate.
Some folks love to wrestle with questions such as how to do a binary multiply/divide (that includes me .. I tend to write the code fresh rather than use macros). Other folks just want to get the job done. And a few trust their floating point processors (even that of…
Igor, Thanks for helping me with GameSmith. Well I think the only choice for me is to go and buy SAS C… Diego!
Phillip, >> I couldn't work out how to do 8 byte multiply/divide well, if you got Knuth Vol. 2 `Seminumerical Algorithms', there is extensive discussion of this matter. And yes, while multibyte addition/subtraction is quite simple using the ADDX and SUBX commands, multiplication is not that easy, and division is…
It was a typo in my post…it was "%7.000000f\n",number -Daniel (useing my dads account)
I ended up writing string maths multiply and divide, I couldn't work out how to do 8 byte multiply/divide 🙁 Phill
Carlo, I had same problems with GameSmith examples and DICE v.3. The main problem is that GameSmith.lib is compiled to be SAS C compatible (and it works fine with SAS C 6.5 🙂 ). GameSmith_ni.lib is considered DICE friendly but it doesn't work either. Tecnical support told me that thay…
Werner, > even with 4 Bytes, math will not be sufficiant for commercial programs, as accuracy is only granted for ? 21,474,836 $ plus 48 c. Unfortunately, when it comes to "exact" math calculations in c, I'm not the one to ask. The 4 Bytes I was discussing were for…
Dan, even with 4 Bytes, math will not be sufficiant for commercial programs, as accuracy is only granted for ? 21,474,836 $ plus 48 c. The summarized cash movements will exceed this value even with small companies. So you have to write your own at least 8 Byte math routines…
> He can also get a few more ounces out of the number (if it's positive) by, as Jim recommends, having it as an unsigned as well. Nonetheless, I think we need to see what the actual problem is, before presenting these solutions (though they _are_ good food for thought…
>Instead of using "int" as your declaration, use "long". That will give you >4 Bytes which allows from -2,147,483,648 to +2,147,483,648. He can also get a few more ounces out of the number (if it's positive) by, as Jim recommends, having it as an unsigned as well. Nonetheless, I think…
>i tryed printf("%7.000000\n, number);…It dident work. BTW, all few posts, including mine earlier today, are assuming that you're still trying to output floats, and that the above was a typo somehow, and hence didn't comment on this, but actually, is it a typo when you posted your problem, or do…
>…finite universe divide 10 by 3, in decimal, perfectly? >Even with 24 megabytes of memory, the "3" digits >would march on and there would be a loss of "perfection" somewhere. Exactly. (Though some number can be represented, it's still a matter of what we're talking about, and what `conversions' need…
.. did you try UNSIGNED? –Jim
>> CAN the Amiga do perfect addition, subtraction … with decimal .. ? It's a matter of definition. Can any entity in the finite universe divide 10 by 3, in decimal, perfectly? Even with 24 megabytes of memory, the "3" digits would march on and there would be a loss…
Dan, Instead of using "int" as your declaration, use "long". That will give you 4 Bytes which allows from -2,147,483,648 to +2,147,483,648. Aztec's "int" uses 2 bytes. It's "long" uses 4. Lattice/SAS uses 4 for both. Look at page 68 and 69 of you book. It explains it a little…
> I'll try that. On a side note, CAN the amiga do perfact addition, subtraction, * and / with decimal without errors? BTW, i tryed printf("%7.000000\n, number);…It dident work. oh well. Thanks for the pointer! 🙂 -Daniel (useing my dads account) Dan, Try: printf (%7.6f\n", variable); The "7" is the…
>I'll try that. On a side note, CAN the amiga do perfact addition, subtraction, >* and / with decimal without errors? Yes, but everything is of course finite. > BTW, i tryed printf("%7.000000\n, >number);…It dident work. oh well. Thanks for the pointer! Remember that printf needs to _convert_ the float…
I'll try that. On a side note, CAN the amiga do perfact addition, subtraction, * and / with decimal without errors? BTW, i tryed printf("%7.000000\n, number);…It dident work. oh well. Thanks for the pointer! 🙂 -Daniel (useing my dads account)
I tred to do this, but with the aztek C compilar, int only goes +32,xxx to -32,xxx (I forget exactly how high and low) , but I'll try a diffrent datatype. -Daniel (useing my dads account.
Well I don't know Gamesmith or DICE but here are a few ideas to be going on with. If the compiler is reporting errors in Gamesmith structures, are you including all the #includes that Gamesmith needs? If the Gamesmith .h files are in their own directory you may need to…
#Problems with DICE.
Message #48485
Okay here's the deal: anyone who finds how to help me will receive a free copy of my future game (keep waitin'!). Seriously, I've got problems with DICE. I just bought the GameSmith Developement System and I'm trying to use the library. The fact is that DICE doesn't seem to…
A HD Anim Player?
Message #48484
Hi, Here's the problem: I need an HD animplayer to play long animations. The player needs to be accessible from CLI if possible, but if it's in the form of a C library, then it works fine for me. I know there are many out there, like BigAnim. But the…
Doug, If you want to use a counter, it's best to use an integer instead of a float. Change to: int number . . . while (number >= 0) . (printf (%d\n", number); . This should work. As a matter of fact, I've got it running as I type this.…
You're just learning about the charms of floating point. You may change your variable to an integer type (I suggest LONG or UNISGNED LONG), and the fractional part will go away. You may make your floating point number DOUBLE (or LONG FLOAT) and the fractional part will become virtually insignificant.…
#BEGENNER HELP" again!
Message #48455
Could someone pleese tell me what is wrong with the following program (it is in C…compiled with the manix/Aztec compilar-linker (commersial)) main() { float number; printf("hello!\n"); number = 1000000; while(number >= 0) { printf("%f\n", number); number = number – 1.; } } It is supposed to open up a window…
Thanks. wmc – via Autopilot!
Palindrome Steve Daring to be different – Amiga on the Internet – Lotus on the Interstate
Well, if we formed a company and used our initials it would almost be one of those watcha-ma-call-its that reads the same forward or backward. wmc – via Autopilot!
pardon me for butting in, but how did you have more than one file.c in a directory???? Phill
greetings…. your initials are interesting to me. My name is also Wayne and my initials are cwm.
greetings… thanks, it's working OK now. I think the problem was that I had more than one file.c in the directory. Ever do any C++?
One approach would be to store your strings in encrypted form and decrypt them just before they are displayed. A simple method which would deter the casual hacker (but not a determined code breaker) would be to exclusive or each character in the string with a fixed bit pattern. This…
> These were the lastest book published by Abacus. The only cover 1.2 and 1.3 of the os and have NO material on os 2.0 and above. That's what I thought, but they are good _Starter_ books. They teach the basics of variables, includes, pointers, functions, etc. And they have…
Duane. Thanks for the info. Stew
Another good book that I have (not Amiga-specific, though) is "High Resolutioon Computer Graphics Using C" by Ian Angell. It develops a set of primitives that are then used to develop higher-end applications. I discussed this book sometime back on the Graphics Developers forums with some of the POV-Ray guys,…
GCC
Message #48315
Hi, I recently downloaded Ispell, and would like to make my own dictionary. I have GNU-GCC installed, but as I am not a programmer at all, just don't know where to start. Can anyone guide me through ? . – Lieven Lema
>I noticed that any printf messages in my source were left as text >strings in the compiled program. Yes. > What I don't like about this is that anyone >with a good editor can change what I have written to the user. Yes. >How can I code constant strings into…
>The key is here, to concentrate on "C" first. Learn ANSI C with ANSI C >funstions, and get to know them well, before you plunge into Amiga C. I couldn't agree more.
Henry, If it really is a problem, at the start of your program, have it read in it's own file from disk and do a CRC check to verify that the file has not been changed. // \X/ Amiga lives? Gerald Bonnstetter, Bonnsoft
>>I'm certainly hard put to name a text that will take >>you gently into the Amiga's environment. Try "Mastering Amiga C" by Paul Overaa, Bruce Smith Books. It isn't too bad, and starts at a fairly low level. The key is here, to concentrate on "C" first. Learn ANSI C…
Page 1 of 99