- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A few years ago we were talking about a package to handle large integers - say 200 long, I know it is here, but I cannot find it with a long search.
Does someone remember the package?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
The interesting challenge is that as soon as one starts working on math with integers you run out of large enough variables.
@Arjen_Markus do you have a program that access sql server from Fortran. I thought I recognized your name on a web stie.
I was looking to use SQL server to store and retrieve the prime number stuff, I spent two days trying to get an old FORDBC program to access any database. The code is very painful and hidden in a library.
It took 20 minutes last night in net.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was just playing with the largest integer I can use in Intel Fortran. I was just checking it with this program.
! Primer5.f90
!
! FUNCTIONS:
! Primer5 - Entry point of console application.
!
!****************************************************************************
!
! PROGRAM: Primer5
!
! PURPOSE: Entry point for the console application.
!
!****************************************************************************
program Primer5
use iso_fortran_env
implicit none
character*10 filename
integer nprimemax
integer(kind=selected_int_kind(15)):: i
integer sr
integer(kind=selected_int_kind(15)):: j15, j16
sr = 15
nprimemax = 2147483647
! nprimemax = 100000000
filename = "Data.Txt"
open(sr, file = filename, status = "UNKNOWN")
j16 = huge(j15)
do i = 1, j16
if(mod(i,1000000000) == 0) then
write(*,*)i
write(sr,*)i
end if
end do
print *,'Selected Integer Kind 15:'
print *, huge(j15)
end program Primer5
it takes a few minutes to run on core i7 with an SSD.
The huge int is the same as taking a one metre step towards the moon and the largest Mersenne prime is 10% of the way to the moon - today.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that is me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have FORDBC connected with the right string, the program retrieves all the table characteristics but it will not get the data.
The connection string works and I get the data using .NET. The jolly interesting thing is in mysql and net you just use a simple package and it works.
My only problem is an intense lifelong dislike of C and so I will have to brush up on getting the C interface to work. That is the problem with being taught Fortran and LISP as your first languages - after that the rest are just crappy to work with.
I will give your code a try, thanks.
Note: I watched the last Die hard movie last night, the computer stuff and the computer people were jolly fun, if you have not seen it, it is worth a look.
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page