Board index » delphi » Largest Number Allowed In TMT Pascal?

Largest Number Allowed In TMT Pascal?

I'm thinking of buying the Multi-Target version of TMT Pascal. How does it
compare to BP7 in terms of the largest number that can be displayed? I want
to write some combinatorics programs which may tend to have some incredibly
large numbers. TIA.

--
Patrick D. Rockwell

 

Re:Largest Number Allowed In TMT Pascal?


Quote
In article <xXiW9.1121$1W2....@newssvr16.news.prodigy.com>, Patrick D. Rockwell wrote:
> I'm thinking of buying the Multi-Target version of TMT Pascal. How does it
> compare to BP7 in terms of the largest number that can be displayed? I want
> to write some combinatorics programs which may tend to have some incredibly
> large numbers. TIA.

Any 32-bits compiler has a limit of 4 billion, or maybe in the case of a
valid 64-bit type (don't know if TMT has it, it is a D4+ feature IIRC)
(2^64 which is about 16*10^18)

For higher values, one needs so called "big int" units, which are available for
all compilers, FPC,GPC,BP7 inclusive.

Some other (Free) compilers:
- Free Pascal www.freepascal.org
- GNU Pascal  www.gnu-pascal.org

If you are into pure math, GNU Pascal might be the best choice (yuck, that I
have to say this), it has several math packages, and probably can link to
GNU Fortran.

Re:Largest Number Allowed In TMT Pascal?


"Marco van de Voort" <mar...@toad.stack.nl> wrote in message
news:slrnb2jftd.24ba.marcov@toad.stack.nl...
Quote
> In article <xXiW9.1121$1W2....@newssvr16.news.prodigy.com>, Patrick D.
Rockwell wrote:
> > I'm thinking of buying the Multi-Target version of TMT Pascal. How does
it
> > compare to BP7 in terms of the largest number that can be displayed? I
want
> > to write some combinatorics programs which may tend to have some
incredibly
> > large numbers. TIA.

> Any 32-bits compiler has a limit of 4 billion, or maybe in the case of a
> valid 64-bit type (don't know if TMT has it, it is a D4+ feature IIRC)
> (2^64 which is about 16*10^18)

> For higher values, one needs so called "big int" units, which are
available for
> all compilers, FPC,GPC,BP7 inclusive.

> Some other (Free) compilers:
> - Free Pascal www.freepascal.org
> - GNU Pascal  www.gnu-pascal.org

> If you are into pure math, GNU Pascal might be the best choice (yuck, that
I
> have to say this), it has several math packages, and probably can link to
> GNU Fortran.

Is there a way to link Borland C/C++ to BP7 or is there a reason that one
would or wouldn't want to?

Also, I know that this isn't the C/C++ group, but does Borland C/C++ handle
the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.
--
Patrick D. Rockwell

Re:Largest Number Allowed In TMT Pascal?


If you want to do combinatorics with all those FACTORIALS and such then
FORGET integers! Try 'extended'. It's a floating point data type with a
range and precision that should be enough. I'm not sure if it's
standardized. If not, then IIRC there is also a 'double' type with a quite
wide range.

You could use a type definition:

type bigfloat=extended; {or double or whatever is available and has the
biggest range}

to define a (changeable) numeric type for that stuff.

IIRC it is also possible to remap 'real' to 'extended'.

Marco van de Voort <mar...@toad.stack.nl> wrote:

Quote
> In article <xXiW9.1121$1W2....@newssvr16.news.prodigy.com>, Patrick D.
> Rockwell wrote:
>> I'm thinking of buying the Multi-Target version of TMT Pascal. How
>> does it compare to BP7 in terms of the largest number that can be
>> displayed? I want to write some combinatorics programs which may tend
>> to have some incredibly large numbers. TIA.

> Any 32-bits compiler has a limit of 4 billion, or maybe in the case of
> a valid 64-bit type (don't know if TMT has it, it is a D4+ feature
> IIRC) (2^64 which is about 16*10^18)

> For higher values, one needs so called "big int" units, which are
> available for all compilers, FPC,GPC,BP7 inclusive.

> Some other (Free) compilers:
> - Free Pascal www.freepascal.org
> - GNU Pascal  www.gnu-pascal.org

> If you are into pure math, GNU Pascal might be the best choice (yuck,
> that I have to say this), it has several math packages, and probably
> can link to GNU Fortran.

Re:Largest Number Allowed In TMT Pascal?


Quote

> Is there a way to link Borland C/C++ to BP7 or is there a reason that
one
> would or wouldn't want to?

You can link .obj files

Quote
> Also, I know that this isn't the C/C++ group, but does Borland C/C++
handle
> the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.

The memory limit in BP is  64 MB if you compile to protected mode.

--
Femme

Re:Largest Number Allowed In TMT Pascal?


[snip]

Quote

> Is there a way to link Borland C/C++ to BP7 or is there a reason that one
> would or wouldn't want to?

Yes you can. Simply create an OBJ file of your C/C++ Code and use it
with {$L myc.obj} if myc.obj is the filename. There only was something
with the parameters of functions/procedures, but that may be cleared by
some other person here...

But: you don't want to do this, because you don't need this (except you
do things like much complicated pointer arithmetic which should be
avoided anyhow and which can to some extend be done with TP/BP too).

Quote

> Also, I know that this isn't the C/C++ group, but does Borland C/C++ handle
> the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.

Normally not, but that depends on the DOS extender uses. The one from BP
7 can handle 16-Bit DLLs and use up to 64 MB RAM (there's maybe the
possibility to use several 64 MB segments, but that's not proven yet)
and you can have a swapfile to some extend to (automaticaly handled,
breaking the 64 MB barrier to at least 128 MB).

Free Pascal comes with a different Extender, which can use up to 768 MB
(at least someone, I think Femme, told me once). One drawback: no DLL
support...

I don't know what DOS extender is used by TMT Pascal...but DLL Handling
isn't so good here.

Greetings

Markus

PS: some math packages are in the www.gdsoft.com - SWAG Archives

Re:Largest Number Allowed In TMT Pascal?


Quote
In article <polW9.1149$jY3....@newssvr16.news.prodigy.com>, Patrick D. Rockwell wrote:
>> - Free Pascal www.freepascal.org
>> - GNU Pascal  www.gnu-pascal.org

>> If you are into pure math, GNU Pascal might be the best choice (yuck, that
> I
>> have to say this), it has several math packages, and probably can link to
>> GNU Fortran.

> Is there a way to link Borland C/C++ to BP7 or is there a reason that one
> would or wouldn't want to?

Afaik one can link the dos compilers with BP7, but not the "builder" 32-bits
windows ones.

The free ones all support linking to GNU gcc.

Quote
> Also, I know that this isn't the C/C++ group, but does Borland C/C++ handle
> the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.

Afaik no, there is a DPMI variant, like BP, that's all.

Re:Largest Number Allowed In TMT Pascal?


Quote
In article <3E2A6D34.5080...@freenet.de>, Markus Humm wrote:
>> Also, I know that this isn't the C/C++ group, but does Borland C/C++ handle
>> the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.

> Normally not, but that depends on the DOS extender uses. The one from BP
> 7 can handle 16-Bit DLLs and use up to 64 MB RAM (there's maybe the
> possibility to use several 64 MB segments, but that's not proven yet)
> and you can have a swapfile to some extend to (automaticaly handled,
> breaking the 64 MB barrier to at least 128 MB).

> Free Pascal comes with a different Extender, which can use up to 768 MB
> (at least someone, I think Femme, told me once). One drawback: no DLL
> support...

Interesting, Femme, was this under plain dos or Windows?

True, the extender scales to very high, but I never managed to get more than
128 MB (because of the DPMI host).

Re:Largest Number Allowed In TMT Pascal?


Quote

> Interesting, Femme, was this under plain dos or Windows?

Could be that you were the one who told me...but I don't remember and a
quick look with google didn't turn it up too... :-(

Quote

> True, the extender scales to very high, but I never managed to get more than
> 128 MB (because of the DPMI host).

This extender seems to rune fine without a DPMI host, so the only
limitation would be the XMS provider, yes?

Greetings

Markus

Re:Largest Number Allowed In TMT Pascal?


Quote
In article <3E2AEE06.3010...@freenet.de>, Markus Humm wrote:

>> Interesting, Femme, was this under plain dos or Windows?

> Could be that you were the one who told me...but I don't remember and a
> quick look with google didn't turn it up too... :-(

Not probably. But it could be that the 128 MB I have in mind is old (iow
there is probably a newer cwsdpmi since I last tested)

Quote
>> True, the extender scales to very high, but I never managed to get more than
>> 128 MB (because of the DPMI host).

> This extender seems to rune fine without a DPMI host, so the only
> limitation would be the XMS provider, yes?

It autoloads one (cwsdpmi.exe) if non found.

Re:Largest Number Allowed In TMT Pascal?


Marco van de Voort wrote:

[128MB Limit]

Quote
> In article <3E2AEE06.3010...@freenet.de>, Markus Humm wrote:

>> This extender seems to rune fine without a DPMI host, so the only
>> limitation would be the XMS provider, yes?

> It autoloads one (cwsdpmi.exe) if non found.

So according to His Majesty Charles W. Sandman itself
(<http://groups.google.de/groups?selm=35c49ec4.sandmann%40clio.rice.edu>)
the limit seems to be 256 physical plus 256 virtual memory then.

Unless you fix the sources. ;)

Vinzent.

--
Don't take life too seriously -- you'll never get out of it alive.

Re:Largest Number Allowed In TMT Pascal?


Marco van de Voort wrote:

[128MB Limit]

Quote
> In article <3E2AEE06.3010...@freenet.de>, Markus Humm wrote:

>> This extender seems to rune fine without a DPMI host, so the only
>> limitation would be the XMS provider, yes?

> It autoloads one (cwsdpmi.exe) if non found.

So according to His Majesty Charles W. Sandman himself
(<http://groups.google.de/groups?selm=35c49ec4.sandmann%40clio.rice.edu>)
the limit seems to be 256 physical plus 256 virtual memory then.

Unless you fix the sources. ;)

Vinzent.

--
Don't take life too seriously -- you'll never get out of it alive.

Re:Largest Number Allowed In TMT Pascal?


Quote
"Femme Verbeek" <fv[at]{*word*104}jet[dot]nl> wrote in message

news:v2jv1krequ4g67@corp.supernews.com...
Quote

> > Is there a way to link Borland C/C++ to BP7 or is there a reason that
> one
> > would or wouldn't want to?

> You can link .obj files

> > Also, I know that this isn't the C/C++ group, but does Borland C/C++
> handle
> > the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.

> The memory limit in BP is  64 MB if you compile to protected mode.

> --
> Femme

I thought that it was 16 MB. What is the memory of Borland C/C++? Is there a
way to write a routine in C++ and link it to BP7?

--
Patrick D. Rockwell

Re:Largest Number Allowed In TMT Pascal?


Patrick D. Rockwell schrieb:

Quote
> "Femme Verbeek" <fv[at]{*word*104}jet[dot]nl> wrote in message
> news:v2jv1krequ4g67@corp.supernews.com...

>>>Is there a way to link Borland C/C++ to BP7 or is there a reason that

>>one

>>>would or wouldn't want to?

>>You can link .obj files

>>>Also, I know that this isn't the C/C++ group, but does Borland C/C++

>>handle

>>>the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.

>>The memory limit in BP is  64 MB if you compile to protected mode.

>>--
>>Femme

> I thought that it was 16 MB. What is the memory of Borland C/C++? Is there a
> way to write a routine in C++ and link it to BP7?

As said in THIS posting already, you can link in C created obj-files if
you DON'T use the library functions of C or make sure they are in the
obj as well and still function then...

The 16 MB memory limit only applies to 286 CPUs and to 386sx CPUs or to
some very old memory managers.

Greetings

Markus

Re:Largest Number Allowed In TMT Pascal?


Quote
Femme Verbeek wrote in message ...

>> Is there a way to link Borland C/C++ to BP7 or is there a reason that
>one
>> would or wouldn't want to?

>You can link .obj files

>> Also, I know that this isn't the C/C++ group, but does Borland C/C++
>handle
>> the 640K memory lmit any differently than BP7 under Dos 6.22? TIA.

>The memory limit in BP is  64 MB if you compile to protected mode.

Unless you don't use PM but FRM, in which case it's 4Gb.

Robert
--
Robert AH Prins
pr...@bigfoot.com

Go to page: [1] [2]

Other Threads