Click here to Skip to main content
15,914,452 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I've never made more use of the windows calculator Pin
W Balboos, GHB19-Oct-18 4:39
W Balboos, GHB19-Oct-18 4:39 
GeneralRe: I've never made more use of the windows calculator Pin
Sander Rossel19-Oct-18 5:04
professionalSander Rossel19-Oct-18 5:04 
GeneralRe: I've never made more use of the windows calculator Pin
OriginalGriff19-Oct-18 5:23
mveOriginalGriff19-Oct-18 5:23 
GeneralRe: I've never made more use of the windows calculator Pin
PIEBALDconsult19-Oct-18 6:51
mvePIEBALDconsult19-Oct-18 6:51 
GeneralRe: I've never made more use of the windows calculator Pin
ZurdoDev19-Oct-18 7:28
professionalZurdoDev19-Oct-18 7:28 
GeneralRe: I've never made more use of the windows calculator Pin
kalberts19-Oct-18 9:25
kalberts19-Oct-18 9:25 
GeneralRe: I've never made more use of the windows calculator Pin
ZurdoDev19-Oct-18 9:28
professionalZurdoDev19-Oct-18 9:28 
GeneralRe: I've never made more use of the windows calculator Pin
kalberts19-Oct-18 11:48
kalberts19-Oct-18 11:48 
I don't have a memory of it, but consider: It is just 20.000 multiplications. That shouldn't take to long!
C++
double fact(int i) {
  double result = 1.0;
  for (int factor = 1; factor <= i; factor ++) result *= factor;
  return result;
}
... or something like that. (I didn't run this through a compiler, but I think it is reasonably obvious code.)

Now that I look at it: The IEEE 754 format would not be able to handle 20,000! even in 64 bit format. When we did this calculation, in 1977-78, IEEE 754 was not established, so we used whatever format was available at that CDC mainframe. I cannot recall the details of that format, or whatever workaround we used to overcome the range limitations.

Neverhteless: Even if I were to repeat the experiment, using one of the many infinite-precision packages available today, it still would requre only 20,000 extended precision multiplications. Even in arbitrarily extended precision, a multiplication won't take that much time. Actually, I suspect that if your extended precision package is binary based, converting the result to an ASCII digit stream would be more time consuming than doing the 20,000 multiplications. Maybe even doing the multiplications in decimal, digit-by-digit format, would be time-saving, compared to the lengthy division operations required for the printout.

bonus chatter:

As students, we wrote an extended precision package for a fellow student in "Theoretical Physics" working on a model to simulate two colliding waves. His initial model displayed some rather unlikely artifacts, such as resulting waves having 90 degrees corners. So we made him a library which, by 200 decimal digits, gave him the precision to model these waves properly.

In the process, we realized that he had no understanding whatsoever for the importance of adding the elements of a series expansion from the smaller to the larger. He was in theoretical physics, where the order of the addends has no importance, theoretically. He was completely unable to understand that in practice, there is a difference. ("In theory, there is no difference between theory and practice, but in practice there is" ...) Most likely the native 72 bits precision of the Univac 1100 mainframe computer would have been more than sufficient if he had only learned to add the series from the other end!
GeneralRe: I've never made more use of the windows calculator Pin
Daniel Pfeffer20-Oct-18 6:40
professionalDaniel Pfeffer20-Oct-18 6:40 
GeneralRe: I've never made more use of the windows calculator Pin
raddevus19-Oct-18 8:46
mvaraddevus19-Oct-18 8:46 
GeneralRe: I've never made more use of the windows calculator Pin
PIEBALDconsult19-Oct-18 9:08
mvePIEBALDconsult19-Oct-18 9:08 
GeneralRe: I've never made more use of the windows calculator Pin
  Forogar  19-Oct-18 9:39
professional  Forogar  19-Oct-18 9:39 
GeneralRe: I've never made more use of the windows calculator Pin
The pompey19-Oct-18 12:24
The pompey19-Oct-18 12:24 
GeneralRe: I've never made more use of the windows calculator Pin
abmv19-Oct-18 20:10
professionalabmv19-Oct-18 20:10 
GeneralRe: I've never made more use of the windows calculator Pin
Mark_Wallace20-Oct-18 4:28
Mark_Wallace20-Oct-18 4:28 
GeneralRe: I've never made more use of the windows calculator Pin
Joan M20-Oct-18 10:54
professionalJoan M20-Oct-18 10:54 
General922! Pin
Mark_Wallace19-Oct-18 3:46
Mark_Wallace19-Oct-18 3:46 
GeneralRe: 922! Pin
ZurdoDev19-Oct-18 5:27
professionalZurdoDev19-Oct-18 5:27 
GeneralRe: 922! Pin
Gary Wheeler19-Oct-18 7:14
Gary Wheeler19-Oct-18 7:14 
GeneralRe: 922! Pin
PIEBALDconsult19-Oct-18 7:40
mvePIEBALDconsult19-Oct-18 7:40 
GeneralRe: 922! Pin
raddevus19-Oct-18 8:49
mvaraddevus19-Oct-18 8:49 
GeneralRe: 922! Pin
Rick York19-Oct-18 10:43
mveRick York19-Oct-18 10:43 
GeneralRe: 922! Pin
ZurdoDev19-Oct-18 15:41
professionalZurdoDev19-Oct-18 15:41 
JokePeople need to stop putting flyers on my car! PinPopular
Johnny J.19-Oct-18 3:23
professionalJohnny J.19-Oct-18 3:23 
GeneralRe: People need to stop putting flyers on my car! Pin
Ron Anders19-Oct-18 3:26
Ron Anders19-Oct-18 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.