Computer

Anything relating to computers, including operating systems (i.e. Linux), languages (i.e. C), and hardware

Finding the number of digits in N!

A quick bit of code to find the number of digits in N!

The number of digits in a number X = CEILING[log(X)]
and N! = (N * N-1 * N-2 ... * 1)
Thus, the number of digits in N! = CEILING[log(N!)]
Page: 

Word counting using a binary tree dictionary

Introduction

In "The C Programming Language", the authors present an example program that counts unique words in a text. Such a program needs to maintain a list of every unique word encountered, and for each word, an associated count of the number of occurrences.

Page: 

Generating Mazes

Introduction

recursion
noun See recursion
Page: 

Computing e

Introduction

One of the things computers are useful for is computing large (and small) numbers. The number called e is the base of natural logarithms, and is one of those "transcendental numbers".

Page: 
Subscribe to RSS - Computer