Skip to content

Gaurav Sharma's Blog

Articles on Statistics, Machine Learning and Functional Programming

  • About
  • Sample Page

Categories:

  • Algebra
  • Analysis
  • BookExcerpts
  • Circuit Simulation
  • Computer Science
  • Concurrency
  • Design
  • Development Tools
  • Essays on Life and Philosophy
  • Fixed Point
  • Functional Programming
  • Git
  • Hackers
  • Haskell
  • History of Mathematics
  • Inference
  • Interpreters
  • Linear Regression
  • Linear Regression Models
  • Links
  • MapReduce and NoSQL
  • Mathematics
  • Numerical Methods
  • On Writing
  • OOP
  • PaulGrahamEssays
  • Prime Numbers
  • Probability
  • Programming Tasks
  • Quotes
  • Racket
  • Rationality
  • SAS
  • Scheme
  • Sicp Solutions
  • Signal Processing
  • Startups
  • Statistical Software
  • Statistics
  • Tail Recursion
  • Time Series
  • Type Theory
  • Uncategorised
  • Uncategorized

Recent Posts

  • Quotes from Stoic Emperor
  • Hello world!
  • Quotes on Focusing
  • Excerpts from ‘How to Work Hard’
  • Flow – The Psychology of Optimal Experience

Recent Comments

  • A WordPress Commenter on Hello world!

Category: Programming Tasks

x to the power x = a constant by Fixed point

A solution to xx = 1000 by finding a fixed point of x log(1000)/log(x).

Posted on October 1, 2015Author Gaurav SharmaCategories Fixed Point, Functional Programming, Programming Tasks

Golden Ratio by Fixed Point of a Function

The golden ratio is a fixed point of the transformation x 1 + 1/x. The code below uses this to compute it.

Posted on October 1, 2015Author Gaurav SharmaCategories Fixed Point, Functional Programming, Programming Tasks

Simpson’s Rule for Integration

Implementation of simpson’s rule for integration

Posted on October 1, 2015Author Gaurav SharmaCategories Functional Programming, Numerical Methods, Programming Tasks

Testing for Primality – Improved

Improved version of Testing for primality

Posted on October 1, 2015Author Gaurav SharmaCategories Functional Programming, Prime Numbers, Programming Tasks

Testing for Primality

Test a number for primality.

Posted on October 1, 2015Author Gaurav SharmaCategories Functional Programming, Prime Numbers, Programming Tasks

Multiplication by Successive Doubling

Implementation of a tail recursive algorithm for multiplication by means of repeated addition (doubling).

Posted on October 1, 2015Author Gaurav SharmaCategories Functional Programming, Programming Tasks, Tail Recursion

Exponentiation by successive squaring

Implementation of a procedure that evolves an iterative exponentiation process that uses successive squaring and uses a logarithmic number of steps.

Posted on October 1, 2015Author Gaurav SharmaCategories Functional Programming, Programming Tasks, Tail Recursion

Square-root using Newton’s Method

The following uses Newton’s Method to find square root.

It keeps record of how guess changes from one iteration to the next and stops when the change is a very small fraction of the guess.

 

Posted on September 30, 2015Author Gaurav SharmaCategories Functional Programming, Numerical Methods, Programming TasksLeave a comment on Square-root using Newton’s Method

Continued Fraction For Tangent Function

A continued fraction representation of the tangent using J.H. Lambert’s formula:

where x is in radians.

k specifies the number of terms to compute:

 

 

Posted on September 30, 2015Author Gaurav SharmaCategories Functional Programming, Numerical Methods, Programming Tasks, SchemeLeave a comment on Continued Fraction For Tangent Function

Posts navigation

Previous page Page 1 Page 2
Proudly powered by WordPress