# Lec05

Pytorch

1. Floating point operations - scientific computing/ML. On CPU or GPU. Distributed computing.
2. Optimization features.
3. ML.

Numeric types

Python:

ints: no maximum/minimum size. Bigger/smaller values => more bits necessary.

floats: use the one supported by cpu natively. Usually 64 bits, (double precision), 32 bits (single precision) (like exponential notation)

Complex

Pytorch

Overflow and underflow for integer. (e.g if int get to largest)

Float - does not overflow, but can ge saturated (float\_info.max, float\_info.min)

inf and nan.

float\_info.dig # number of digit it can represent (precision(

float\_info.epsilon&#x20;

x = 1.0

x + float\_info.epsilon # next number after 1.0

Pytorch build in docker example

<figure><img src="/files/JIAG3HoYjFmuL0MPjwF3" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tianyi0216.gitbook.io/blog/course_notes/544-notes/lec05.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
