<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSSwapBigFloatToHost(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@F@NSSwapBigFloatToHost"
  },
  "title" : "NSSwapBigFloatToHost(_:)"
}
-->

# NSSwapBigFloatToHost(_:)

Swaps the bytes of a number.

```
func NSSwapBigFloatToHost(_ x: NSSwappedFloat) -> Float
```

## Discussion

Converts the big-endian value in `x` to the current endian format and returns the resulting value. If it is necessary to swap the bytes of `x`, this function calls [`NSSwapFloat(_:)`](/documentation/Foundation/NSSwapFloat(_:)) to perform the swap.

## See Also

[`func NSSwapHostFloatToBig(Float) -> NSSwappedFloat`](/documentation/Foundation/NSSwapHostFloatToBig(_:))

Swaps the bytes of a number.

[`func NSSwapLittleFloatToHost(NSSwappedFloat) -> Float`](/documentation/Foundation/NSSwapLittleFloatToHost(_:))

Swaps the bytes of a number.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)