View source code
							
							
						
								Display the source code in std/numeric.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Alias std.numeric.CustomFloat
Allows user code to define custom floating-point formats. These formats are
 for storage only; all operations on them are performed by first implicitly
 extracting them to real first. After the operation is completed the
 result can be stored in a custom floating-point value via assignment.
						
						
				alias CustomFloat(uint precision, uint exponentWidth, CustomFloatFlags flags = CustomFloatFlags
				  
				
				if (((flags & flags
				Alias CustomFloat
Alias CustomFloat
Struct CustomFloat
Constructors
| Name | Description | 
|---|---|
| this | Initialize from any realcompatible type. | 
Properties
| Name | Type | Description | 
|---|---|---|
| dig[get] | size_t | |
| epsilon[get] | CustomFloat | |
| get[get] | F | Fetches the stored value either as a float,doubleorreal. | 
| im[get] | CustomFloat | |
| infinity[get] | CustomFloat | |
| max[get] | CustomFloat | |
| max_10_exp[get] | int | |
| min_10_exp[get] | int | |
| min_normal[get] | CustomFloat | |
| nan[get] | CustomFloat | |
| re[get] | CustomFloat | 
Methods
| Name | Description | 
|---|---|
| opAssign | Self assignment | 
| opAssign | Assigns from any realcompatible type. | 
| opBinary | Convert the CustomFloat to a real and perform the relevant operator on the result | 
| opBinaryRight | Convert the CustomFloat to a real and perform the relevant operator on the result | 
| opCmp | Convert the CustomFloat to a real and perform the relevant operator on the result | 
| opOpAssign | Convert the CustomFloat to a real and perform the relevant operator on the result | 
| opUnary | Convert the CustomFloat to a real and perform the relevant operator on the result | 
Aliases
| Name | Description | 
|---|---|
| opCast | Fetches the stored value either as a float,doubleorreal. | 
Templates
| Name | Description | 
|---|---|
| toString | Convert the CustomFloat to a real and perform the relevant operator on the result | 
Example
import stdAuthors
Andrei Alexandrescu, Don Clugston, Robert Jacques, Ilya Yaroshenko
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.