---
title: "SD0044: f64 in an interpolated @location IO field"
description: "SD0044, TypeShade 컴파일러의 오류 코드입니다. f64 in an interpolated @location IO field"
url: https://typeshade.dev/ko/reference/errors/sd0044/
language: ko
---

# `SD0044`

코어 코드

`f64` in an interpolated `@location` IO field

레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

## 프런트엔드에서

같은 실수를 한 `"use typeshade"` 파일은 이 검사까지 오지 않습니다. 프런트엔드가 자기 코드로 먼저 거부하기 때문입니다. 빌드할 때 컴파일한 아래 프로그램에는 다음 진단이 나옵니다.

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(d: location<0, f64>): vec4 {
  return vec4(f32(d), 0., 0., 1.)
}
```

**[TS8038](https://typeshade.dev/ko/reference/errors/ts8038/)** error, 4행: Parameter "d" carries `f64`: an emulated double is a pair of `f32` words, and a `@location` varying interpolates each word on its own, which is not the interpolation of the double. Narrow it with `f32`(x), or compute the double in the stage that needs it — a uniform or storage binding carries an `f64` and every stage can read one.

## 고치는 법

레지스트리의 힌트: interpolating hi/lo pairs is numerically wrong — narrow first (`f32`(x), or toF32(x) in the fn() EDSL), or read the double where it is needed: a uniform or storage binding carries an `f64` and every stage can read one

## 함께 보기

**[`TS8038`](https://typeshade.dev/ko/reference/errors/ts8038/) `F64_ENTRY_IO`**

에뮬레이트한 double(`f64`나 `vec64`)이 진입점의 IO 경계에 있습니다. `@location` 매개변수, IO 구조체의 `@location` 필드, 진입점의 반환값이 그렇습니다. double은 낮춘 뒤 `f32` 워드 두 개이고, varying은 워드를 따로 보간합니다. `f32(x)`로 좁히거나, 필요한 스테이지에서 double을 읽으세요. uniform과 스토리지 바인딩은 `f64`를 담을 수 있습니다.

- [배정밀도 에뮬레이션](https://typeshade.dev/ko/guide/language/from-typescript/double/)
- [`TypeShadeError`](https://typeshade.dev/ko/api/typeshadeerror/)
- [오류 코드](https://typeshade.dev/ko/reference/errors/)

## 소스

커밋 af54ddad5에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.

- [`src/core/passes/fp64-lower.ts:157`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/passes/fp64-lower.ts#L157) (3곳)
