Forum Discussion

NOHWJ's avatar
NOHWJ
Icon for New Contributor rankNew Contributor
5 years ago

How can i use float data type in NIOS II?

Hi,

i added FPH2 (Floating Point Hardware 2) and declared float type variable and printed it to check value.

but, it showed empty value.

is it correct method to use float type like this?

------------------------------------------------------------------------------------------------------------------

float pi = 3.14;

printf("%f",pi);

3 Replies

  • Hi @NOHWJ,

    Thank you for posting in Intel community forum and hope this message find you well.
    The C codes looks good and it should work, possible to share the entire C files for us to better troubleshooting the situation?

    Warm regards.
    BB

    • BoonBengT_Altera's avatar
      BoonBengT_Altera
      Icon for Moderator rankModerator

      Hi @NOHWJ,

      Hope this message find you well, by any chances did you managed to look into the clarification mention above?

      Warm Regards
      BB

      • BoonBengT_Altera's avatar
        BoonBengT_Altera
        Icon for Moderator rankModerator

        Hi @NOHWJ,

        Good day, as we do not receive any response from you to the previous clarification that we have provided. Please post a response in the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you with your follow-up questions.

        Warm Regards

        BB