Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.basic.powerbasic > #26

Re: Legacy program for PowerBASIC?

From "Auric__" <not.my.real@email.address>
Newsgroups comp.lang.basic.powerbasic
Subject Re: Legacy program for PowerBASIC?
Date 2012-02-14 15:47 +0000
Organization A noiseless patient Spider
Message-ID <Xns9FF9598685D94auricauricauricauric@88.198.244.100> (permalink)
References <z2eYq.12907$I33.3934@uutiset.elisa.fi> <6681816c-5149-4ad1-98c7-46cc71a1ffa4@x19g2000yqh.googlegroups.com> <uBc_q.14404$I33.11677@uutiset.elisa.fi> <4f3a6168$1@proxy.mimer.no> <Xns9FF94699B3272auricauricauricauric@88.198.244.100>

Show all headers | View raw


I wrote:

> Personally, I've never found bugs in FreeBASIC -- not
> that I've looked very hard -- but I know of one in PowerBASIC (at least
> through PB/Win 9) regarding QUADs.

Found the bug. Try this line in PB/Win or PB/CC:
  ? FORMAT$(1000000000000000001&&,"#_")

(I can't figure out how to get PB/DOS to print the number without scientific 
notation, even with STR$.)

For some reason, for values of 19 decimal digits (the largest numbers; 20 
digits not possible with QUAD), the compiler thinks it's only 18 digits long, 
so the last digit is always changed to 0. (In the above example, 
1000000000000000001 -> 1000000000000000000.)

This returns 0:
  1000000000000000001&& MOD 10&&
but then, so does the EXTENDED version (1000000000000000001## MOD 10##). (I 
can undertand a loss of precision in fp ops, but not integer ops.)

-- 
I'm tired of "diplomatic solutions" because THEY DON'T FUCKING WORK!!!

Back to comp.lang.basic.powerbasic | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Legacy program for PowerBASIC? Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-02-07 20:27 +0200
  Re: Legacy program for PowerBASIC? "Auric__" <not.my.real@email.address> - 2012-02-07 19:06 +0000
  Re: Legacy program for PowerBASIC? Bob Zale <noreply@powerbasic.com> - 2012-02-13 03:10 -0800
    Re: Legacy program for PowerBASIC? Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-02-13 20:26 +0200
      Re: Legacy program for PowerBASIC? Bob Zale <noreply@powerbasic.com> - 2012-02-13 10:36 -0800
      Re: Legacy program for PowerBASIC? Olav <my.email.goes.here@there.tt> - 2012-02-14 14:28 +0100
        Re: Legacy program for PowerBASIC? "Auric__" <not.my.real@email.address> - 2012-02-14 13:55 +0000
          Re: Legacy program for PowerBASIC? Basic Guy <Basic@Guy.com> - 2012-02-14 09:54 -0500
            Re: Legacy program for PowerBASIC? "Auric__" <not.my.real@email.address> - 2012-02-14 15:24 +0000
          Re: Legacy program for PowerBASIC? "Auric__" <not.my.real@email.address> - 2012-02-14 15:47 +0000
            Re: Legacy program for PowerBASIC? Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-02-14 17:58 +0200
              Re: Legacy program for PowerBASIC? Bob Zale <noreply@powerbasic.com> - 2012-02-15 03:58 -0800
            Re: Legacy program for PowerBASIC? Bob Zale <noreply@powerbasic.com> - 2012-02-15 04:15 -0800
              Re: Legacy program for PowerBASIC? "Auric__" <not.my.real@email.address> - 2012-02-15 14:08 +0000
                Re: Legacy program for PowerBASIC? Bob Zale <noreply@powerbasic.com> - 2012-02-15 08:43 -0800
                Re: Legacy program for PowerBASIC? Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-03-03 09:46 +0200
        Re: Legacy program for PowerBASIC? Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-02-14 17:53 +0200

csiph-web