Skip to content

jsl/design/E-Series

Package name: jsl/design/E-Series

Summary

Data Types

E48

E48 Series

E96

E96 Series

E12

E12 Series

E-Series

E-Series Preferred Numbers

Multis

Function Description
elements Number of elements in the closed sequence of the series.
find-floor
find-ceil
find-in-range (+ 1) Find all the resistors from this series within a given range.
find-nearest Find the closest value in this series.
find-toleranced Find the nearest value in this series as a Toleranced.
name Name of the Series
places Number of places after the decimal to round values in this series.
precision Precision for values in this series.
get-series Closed sequence of values in this series.
get-toleranced Convert a value to a Toleranced

Functions

Function Description
add-precision-series Add a precision series to the searchable E-series.

E24

E24 Series

General Definitions

Function Description
E482823
E96
E122791
closest-std-tol Find Closest Standard value as a Toleranced
closest-std-val (Legacy) - Find Closest Standard Value
E242807
E12
E24
E48
E962839

Definitions

E48

E48 Series

public deftype E48 <: E-Series

These values are typically 2% precision and use 48 elements to cover the 1-10 decade.

E96

E96 Series

public deftype E96 <: E-Series

These values are typically 1% precision and use 96 elements to cover the 1-10 decade.

E12

E12 Series

public deftype E12 <: E-Series

These values are typically 10% precision and use 12 elements to cover the 1-10 decade.

E-Series

E-Series Preferred Numbers

public deftype E-Series

This type defines a number series and then provides tools to work with numbers in that series. Consider for example, the resistor/capacitor/inductor value series when purchasing components.

References

  • https://en.wikipedia.org/wiki/E_series_of_preferred_numbers

Multis

elements

Number of elements in the closed sequence of the series.

public defmulti elements (e:E-Series) -> Int

  • Returns Int

find-floor

public defmulti find-floor (e:E-Series, v:Double) -> Double

  • Returns Double

find-ceil

public defmulti find-ceil (e:E-Series, v:Double) -> Double

  • Returns Double

find-in-range

Find all the resistors from this series within a given range.

public defmulti find-in-range (e:E-Series, minV:Double, maxV:Double) -> Tuple<Double>

  • minV: Double - Minimum value of the search range. Must be non-negative.
  • maxV: Double - Maximum value of the search range. Must be greater than minV
  • Returns Tuple<Double>

find-in-range

Find values from this series within a toleranced range.

public defmulti find-in-range (e:E-Series, v:Toleranced) -> Tuple<Toleranced>

  • Returns Tuple<Toleranced>

find-nearest

Find the closest value in this series.

public defmulti find-nearest (e:E-Series, v:Double) -> Double

  • v: Double - Non-negative value in any power of 10. Must be non-negative.
  • Returns Double - Scaled value from this series at the appropriate power of 10

Given a value, find the closest value from this series using an absolute difference metric.

find-toleranced

Find the nearest value in this series as a Toleranced.

public defmulti find-toleranced (e:E-Series, v:Double) -> Toleranced

  • Returns Toleranced

See find-nearest for more info.

name

Name of the Series

public defmulti name (e:E-Series) -> String

  • Returns String

places

Number of places after the decimal to round values in this series.

public defmulti places (e:E-Series) -> Int

  • Returns Int

precision

Precision for values in this series.

public defmulti precision (e:E-Series) -> Percentage

  • Returns Percentage

This value sets the error bars for any value in this series.

get-series

Closed sequence of values in this series.

public defmulti get-series (e:E-Series) -> Tuple<Double>

  • Returns Tuple<Double>

This sequence must be in ascending order. The sequence must be in the domain [1.0, 10.0).

The default implementation use a rounded log series as expected by E-Series.

get-toleranced

Convert a value to a Toleranced

public defmulti get-toleranced (e:E-Series, v:Double) -> Toleranced

  • Returns Toleranced

Functions

add-precision-series

Add a precision series to the searchable E-series.

public defn add-precision-series (e:E-Series)

E24

E24 Series

public deftype E24 <: E-Series

These values are typically 5% precision and use 24 elements to cover the 1-10 decade.

General Definitions

E482823

public defn E482823 (name:String, elements:Int, places:Int, precision:Percentage)

E96

public defn E96 (name2832:String = ?, elements2833:Int = ?, places2834:Int = ?, precision2835:Percentage = ?)

E122791

public defn E122791 (name:String, elements:Int, places:Int, precision:Percentage)

closest-std-tol

Find Closest Standard value as a Toleranced

public defn closest-std-tol (v:Double, prec:Percentage) -> Toleranced

  • Returns Toleranced

See closest-std-val

closest-std-val

(Legacy) - Find Closest Standard Value

public defn closest-std-val (v:Double, prec:Percentage) -> Double

  • v: Double - Value that we want to convert.
  • prec: Percentage - Precision series that we will to search for. This value can be any positive value percentage. This function will search the available value series to find a precision series less than or equal to this prec value.
  • Returns Double - The value v rounded either down or up to the closest value in the selected series. See find-nearest
  • Throws ValueError - If no series can be found matching the requested precision.

E242807

public defn E242807 (name:String, elements:Int, places:Int, precision:Percentage)

E12

public defn E12 (name2784:String = ?, elements2785:Int = ?, places2786:Int = ?, precision2787:Percentage = ?)

E24

public defn E24 (name2800:String = ?, elements2801:Int = ?, places2802:Int = ?, precision2803:Percentage = ?)

E48

public defn E48 (name2816:String = ?, elements2817:Int = ?, places2818:Int = ?, precision2819:Percentage = ?)

E962839

public defn E962839 (name:String, elements:Int, places:Int, precision:Percentage)