Showcase Your Relics!

  • Thread starter Thread starter Deleted Bruce 182381
  • Start date Start date
D

Deleted Bruce 182381

Guest
I was looking through my box of relics that has old hardware, software, books, and unearthed this DOS 6.22 diskette I was looking for. I have another box in the attic with a Kaypro CP/M, MacIntosh SE, and a PET Commodore with a joystick I played Golf and other games. Is any of this old stuff have collectible value?


IMG_0294.jpeg
 
in 2012 (just checked my records and I also found the eBay listing photo!) I e-bayed a boxed and unused multiple floppy disk Windows v1.0 for an Olivetti M24. I netted £133 from an italian buyer.

Windows V1.jpg
 
Some books.
 

Attachments

  • 20251029_152326.jpg
    20251029_152326.jpg
    1.9 MB · Views: 48
  • 20251029_152423.jpg
    20251029_152423.jpg
    1,014.3 KB · Views: 47
  • 20251029_152504.jpg
    20251029_152504.jpg
    1.2 MB · Views: 45
  • 20251029_152609.jpg
    20251029_152609.jpg
    1.5 MB · Views: 50
Showcase your relics? Hell, I've got my picture as my avatar. How much more showcasing do we need? (Yes, I HAVE been accused of being a relic and a dinosaur.)
 
Back in the late 1960's, I used an English Electric Leo Marconi KDF8 computer which filled a room the size of a football pitch and probably had less power than a calculator.
Col
 
I also conserved the yellow colored punched paper tape that stores the first BASIC program I wrote in high school. A program for finding Perfect Numbers.
We had an old Teletype Model 33 terminal with a 300 baud dialup modem that connected to a GE Mark II Timesharing System in Dartmouth, MA.
The terminal had a paper tape reader/puncher which would read our programs to execute them.

Code:
100 REM FIND PERFECT NUMBERS BETWEEN 2 AND 1E+5
110 REM NORTHFIELD MOUNT HERMON SCHOOL, GILL, MASSACHUSETTS, 1973.
120 REM
130 LET START = 2
140 LET FINISH = 1E+5
150 REM
160 FOR N = START TO FINISH
170 LET SUM = 1
180      FOR I = 2 TO SQR(N)
190        IF N / I = INT(N / I) THEN GOTO 210
200        GOTO 230
210        LET SUM = SUM + I
220        IF N / I <> I THEN LET SUM = SUM + N / I
230      NEXT I
240 IF SUM = N THEN PRINT N;" IS A PERFECT NUMBER"
250 NEXT N
260 END

I rewrote the code in VBA and use it to benchmark CPU's. It has nested loops and is very CPU intensive.
How many seconds does it take for your computer to find perfect numbers between 2 and 100,000?

Keep in mind that the program has to find each number's proper divisors that are whole integers and then has to add those divisors up to see if the sum equals the number being evaluated. The sum of proper divisors of a number is called its aliquot sum, so a perfect number is one that is equal to its aliquot sum. As the number being checked gets higher, the more divisors it has to evaluate to see if they're whole numbers. You may want to shorten the range below 100,000, unless you have a super fast CPU. The first seven perfect numbers are 6, 28, 496, 8,128, 33,550,336, 8,589,869,056, and 137,438,691,328.

Code:
Option Compare Database
Option Explicit

' Function to check if a number is a perfect
Public Function IsPerfectNumber(ByVal NumberToCheck As Long) As Boolean
    Dim SumOfDivisors As Long
    Dim i As Long

    ' A perfect number must be a positive integer greater than 1
    If NumberToCheck <= 1 Then
        IsPerfectNumber = False
        Exit Function
    End If

    SumOfDivisors = 1 ' Start with 1, as 1 is always a divisor

    ' Loop through potential divisors up to half of the number
    For i = 2 To NumberToCheck / 2
        If NumberToCheck Mod i = 0 Then
            SumOfDivisors = SumOfDivisors + i
        End If
    Next i

    ' If the sum of proper divisors equals the number, it's a perfect number
    If SumOfDivisors = NumberToCheck Then
        IsPerfectNumber = True
    Else
        IsPerfectNumber = False
    End If
End Function

' Sub-procedure to find and display perfect numbers
Public Sub FindPerfectNumbers()
    Dim StartRange As Long
    Dim EndRange As Long
    Dim CurrentNumber As Long
    Dim PerfectNumbersFound As String

    ' Get the range from the user (e.g., using InputBox)
    StartRange = InputBox("Enter the starting number for the search:", "Perfect Number Search", 2)
    EndRange = InputBox("Enter the ending number for the search:", "Perfect Number Search", 100000)

    If StartRange > EndRange Then
        MsgBox "Starting number cannot be greater than the ending number.", vbCritical
        Exit Sub
    End If

    PerfectNumbersFound = "Perfect Numbers found in the range " & StartRange & " to " & EndRange & ":" & vbCrLf

    ' Iterate through the specified range
    For CurrentNumber = StartRange To EndRange
        If IsPerfectNumber(CurrentNumber) Then
            PerfectNumbersFound = PerfectNumbersFound & CurrentNumber & vbCrLf
        End If
    Next CurrentNumber

    ' Display the results
    If InStr(PerfectNumbersFound, vbCrLf & vbCrLf) > 0 Then ' Check if any perfect numbers were found
        MsgBox PerfectNumbersFound, vbInformation, "Perfect Numbers"
    Else
        MsgBox "No perfect numbers found in the specified range.", vbInformation, "Perfect Numbers"
    End If
End Sub

View attachment 122047

If you're into the pure mathematics branch of Number Theory, there also are Sociable Numbers and Amicable Numbers. Have fun!
If you are feeling extra evil, pour the punches into a defroster vent.👹
 
Any challenge takers to see how long it takes for your machine to run the above code?
I'm curious to see how fast your machines CPU's can crunch those nested loops.
I scaled down the run to 29,999 numbers. Processing 100K might take too long.
CAVEAT: If you overclocked your cores, make sure you have adequate cooling when running this code.
3 Seconds for 2 to 30000 but I had to fix a bug and added a timer.

1761856184509.png


Code:
' Sub-procedure to find and display perfect numbers
Public Sub FindPerfectNumbers()
    Dim StartRange As Long
    Dim EndRange As Long
    Dim CurrentNumber As Long
    Dim PerfectNumbersFound As String
    Dim NumbersFound As String
    Dim StartTime As Date
    Dim RunSec As Long
    
    ' Get the range from the user (e.g., using InputBox)
    StartRange = InputBox("Enter the starting number for the search:", "Perfect Number Search", 2)
    EndRange = InputBox("Enter the ending number for the search:", "Perfect Number Search", 30000)

    If StartRange > EndRange Then
        MsgBox "Starting number cannot be greater than the ending number.", vbCritical
        Exit Sub
    End If

    PerfectNumbersFound = "Perfect Numbers found in the range " & StartRange & " to " & EndRange & ":" & vbCrLf

    StartTime = Now
    ' Iterate through the specified range
    For CurrentNumber = StartRange To EndRange
        If IsPerfectNumber(CurrentNumber) Then
            NumbersFound = NumbersFound & CurrentNumber & vbCrLf
'            PerfectNumbersFound = PerfectNumbersFound & CurrentNumber & vbCrLf
        End If
    Next CurrentNumber
    RunSec = DateDiff("s", StartTime, Now)
    
    ' Display the results
    If NumbersFound <> vbNullString Then
'    If InStr(PerfectNumbersFound, vbCrLf & vbCrLf) > 0 Then ' Check if any perfect numbers were found
'        MsgBox PerfectNumbersFound, vbInformation, "Perfect Numbers"
        MsgBox PerfectNumbersFound & vbCrLf & NumbersFound, vbInformation, "Perfect Numbers: " & RunSec & " Seconds"
    Else
        MsgBox "No perfect numbers found in the specified range.", vbInformation, "Perfect Numbers"
    End If
End Sub
 
That's fast. Try 2 to 100,000. Where did you find the bug?
The commented out IF at the end checking if any were found did not work when found.
I tried 2 to 100000, it to 28 seconds but there must be another bug because the found list was the same.
 
Oops, I must have accidentally commented that line when posting the code. Your results for 2 to 100K are valid because there's no perfect numbers between 8,129 and 100K. The next perfect number is 33,550,336. That one has many whole number divisors. You can set min to 1 number below that num, and max to 1 after to see how long it takes to calc that one.

The first seven perfect numbers are 6, 28, 496, 8,128, 33,550,336, 8,589,869,056, and 137,438,691,328.
I did the comment out and replaced your if because it didn't calculate true when perfect numbers were found.

2 to 33550338, I stopped it after 20 minutes.

Access looks to be using multiple processors to run this code.

1761857807512.png

1761857885140.png
 
Understood

Yeah, as the loop increments the number being evaluated, the more divisors it has to examine to see which one's are integers, add them to the running total, and compare the final sum to the number being evaluated to see if it's a perfect num.

Try 33,550,336 to 33,550,336 to see if it displays that num as being perfect. The inner loop will eval 33,550,334 sequential numbers to see which one's are whole number divisors, add them up, and compare if the sum equals 33,550,336.

Yes, they're crunching in parallel. I don't see CPUØ. Does your machine have Intel Xeon or AMD Ryzen cores?
In task mgr you can set affinity to the MSACCESS.EXE process to make it run faster.
It's an Intel i7 about 5 years old.
 

Users who are viewing this thread

Back
Top Bottom