# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Show a length on a tape measure and give the closest ruler fractions

Contributed by:
Gustavo Delfino

ResourceFunction["TapeMeasureNumberLinePlot"][ plots the distance |

TapeMeasureNumberLinePlot works with Imperial units (inches, feet, yards etc.) and does not support metric measures.

The input is meant to be a real number representing a length in inches.

The plot includes the closest 4th, 8th, 16th, 32th of an inch.

The plot provide a button that will show a dataset. It includes the errors in each approximation and also shows the closest 64^{th} of an inch.

The closest millimeter precision distance is also shown. This is useful for measurement tapes with dual scales.

The plot ranges between the nearest inch tick marks below and above the input.

Fractions having power of two denominators are known as dyadic rationals.

Show a tape measure with fractions nearest to.4321 inches:

In[1]:= |

Out[1]= |

Use the "Print Dataset" button for more details:

The distance can be larger than 1:

In[2]:= |

Out[2]= |

Any numeric input is acceptable:

In[3]:= |

Note the zero mark on the vernier (with precision to the nearest thousandth of an inch):

Out[2]= |

Find the closest fraction on a standard measuring tape:

In[4]:= |

Out[4]= |

Convert .293 to the nearest tape measure fraction:

In[5]:= |

Out[5]= |

Rationalize also converts to a fraction, but the resulting fraction denominator is not restricted to powers of 2:

In[6]:= |

Out[6]= |

TapeMeasureNumberLinePlot cannot handle integers:

In[7]:= |

Out[7]= |

TapeMeasureNumberLinePlot returns unevaluated for nonpositive inputs:

In[8]:= |

Out[8]= |

In[9]:= |

Out[9]= |

A Manipulate to convert from tenths of an inch to imperial fractions:

In[10]:= |

Out[10]= |

Wolfram Language 13.0 (December 2021) or above

- 1.1.0 – 09 October 2024
- 1.0.0 – 01 July 2024

This work is licensed under a Creative Commons Attribution 4.0 International License