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
E242748
E96
closest-std-tol Find Closest Standard value as a Toleranced
closest-std-val (Legacy) - Find Closest Standard Value
E12
E24
E48
E122732
E482764
E962780

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

E242748

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

E96

public defn E96 (name2773:String = ?, elements2774:Int = ?, places2775:Int = ?, precision2776: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.

E12

public defn E12 (name2725:String = ?, elements2726:Int = ?, places2727:Int = ?, precision2728:Percentage = ?)

E24

public defn E24 (name2741:String = ?, elements2742:Int = ?, places2743:Int = ?, precision2744:Percentage = ?)

E48

public defn E48 (name2757:String = ?, elements2758:Int = ?, places2759:Int = ?, precision2760:Percentage = ?)

E122732

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

E482764

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

E962780

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