Yu Jen Lin

@sammer1107

Joined on Apr 14, 2018

  • contributed by < sammer1107 > [TOC] AA1 & AA2 void add_entry(node_t **head, int new_value) { node_t **indirect = head; node_t *new_node = malloc(sizeof(node_t));
     Like  Bookmark
  • contributed by < sammer1107 > 測驗題 測驗 1 int asr_i(signed int m, unsigned int n) { const int logical = (((int) -1) OP1) > 0; unsigned int fixu = -(logical & (OP2)); int fix = *(int *) &fixu;
     Like  Bookmark
  • contributed by < sammer1107 > 作業說明 完善測試機制 原本的 test case 跑完也不確定結果到底正不正確,所以我決定先從改善 test 機制開始。 NAN="NAN_INT" INF="INF_INT"
     Like  Bookmark
  • contributed by < sammer1107 > ==測驗題目== 測驗 1 #include <stdio.h> #include <stdlib.h> double divop(double orig, int slots) { if (slots == 1 || orig == 0)
     Like  Bookmark
  • contributed by < sammer1107 > 程式原理 Class Renderer 這個 class 負責根據一個 Game 物件的狀態來算繪遊戲場景。Renderer 內固定有一個 RayCaster,讓 Renderer 可以使用他來計算場景。 GetARGB 方法 inline static uint32_t GetARGB(uint8_t brightness) { return (brightness << 16) + (brightness << 8) + brightness;
     Like 1 Bookmark
  • contributed by < sammer1107 > ==測驗題目== 測驗 1 float fp32tobf16(float x) { float y = x; int *py = (int *) &y; unsigned int exp, man; exp = *py & 0x7F800000u;
     Like  Bookmark
  • contributed by < sammer1107 > 測驗題 測驗 1 - Hamming Distance int hammingDistance(int x, int y) { return __builtin_popcount(x ^ y); } 程式原理
     Like  Bookmark
  • contributed by < sammer1107 > 測驗題 測驗 1 #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <string.h> bool is_ascii(const char str[], size_t size)
     Like  Bookmark
  • contributed by <sammer1107> 開發環境 $ uname -a Linux Aspire-V5-591G 4.15.0-117-generic #118~16.04.1-Ubuntu SMP Sat Sep 5 23:35:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 9/12 實作 O(1) q_size
     Like  Bookmark