---
title: "approximate_fraction method"
url: "https://reference.aspose.com/cad/python-net/aspose.cad.fileformats.tiff/tiffsrational/approximate_fraction/"
product: "Aspose.CAD for Python via .NET API References"
---


## approximate_fraction {#float}

Approximates the provided value to a fraction.


### Returns 


A rational number having error less than [`TiffSRational.Epsilon`](/cad/python-net/aspose.cad.fileformats.tiff/tiffsrational).


```python
def approximate_fraction(self, value):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| value | float | The value. |


## approximate_fraction {#float}

Approximates the provided value to a fraction.


### Returns 


A rational number having error less than [`TiffSRational.Epsilon`](/cad/python-net/aspose.cad.fileformats.tiff/tiffsrational).


```python
def approximate_fraction(self, value):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| value | float | The value. |


## approximate_fraction {#float-float}

Approximates the provided value to a fraction.


### Returns 


A rational number having error less than `epsilon`.


```python
def approximate_fraction(self, value, epsilon):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| value | float | The value. |
| epsilon | float | The error allowed. |


## approximate_fraction {#float-float}

Approximates the provided value to a fraction.


### Returns 


A rational number having error less than `epsilon`.


```python
def approximate_fraction(self, value, epsilon):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| value | float | The value. |
| epsilon | float | The error allowed. |



### See Also
* module [`aspose.cad.fileformats.tiff`](../../)
* class [`TiffSRational`](/cad/python-net/aspose.cad.fileformats.tiff/tiffsrational)
